From 5efd434c82fedeaacb18cf4fe86dfee48dedf16f Mon Sep 17 00:00:00 2001 From: Carl Fluke Date: Tue, 1 Sep 2026 16:32:16 -0400 Subject: [PATCH 1/7] chore: regenerate models from latest OpenAPI spec with generator 7.25.0 Co-authored-by: Cursor --- apiSpec/prime-public-spec.yaml | 15007 +++++++++++++++- .../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/BetaRewardsRateTier.java | 115 + .../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/ComboLeg.java | 96 + .../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/ConversionFee.java | 124 + .../prime/model/ConversionFeeTier.java | 98 + .../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 +- .../prime/model/CustomStablecoinAsset.java | 54 + .../model/CustomStablecoinRewardDetails.java | 97 +- .../com/coinbase/prime/model/DateOfBirth.java | 113 +- .../com/coinbase/prime/model/DefiBalance.java | 107 +- .../prime/model/DerivativePosition.java | 294 + .../model/DerivativesCurrencyBalance.java | 270 + .../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 | 505 +- .../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 +- .../prime/model/OptionProductDetails.java | 322 + .../coinbase/prime/model/OptionsDetails.java | 160 + .../java/com/coinbase/prime/model/Order.java | 1315 +- .../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 +- .../prime/model/PriceIncrementStep.java | 81 + .../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 | 463 +- ...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 | 948 +- .../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 | 381 +- .../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 | 115 +- .../prime/model/WalletStakingMetadata.java | 63 +- .../prime/model/WalletUnstakeInputs.java | 117 +- .../coinbase/prime/model/WithdrawalPower.java | 79 +- .../prime/model/XMLiquidatedAsset.java | 139 + .../prime/model/XMLiquidationDetail.java | 251 + .../prime/model/XMLiquidationSummary.java | 187 + .../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 | 2 +- .../model/enums/AdvancedTransferState.java | 5 +- .../model/enums/AdvancedTransferType.java | 5 +- .../prime/model/enums/AllocationSizeType.java | 1 + .../prime/model/enums/AllocationStatus.java | 2 +- .../prime/model/enums/AssetChangeType.java | 5 +- .../coinbase/prime/model/enums/Benchmark.java | 2 +- .../model/enums/BetaRewardsRateTierType.java | 26 + .../prime/model/enums/CandlesGranularity.java | 5 +- .../prime/model/enums/ContractExpiryType.java | 17 +- .../model/enums/CustodyActivityType.java | 1 + .../model/enums/DerivativeProductType.java | 72 + .../prime/model/enums/DestinationType.java | 28 +- .../prime/model/enums/EstimateType.java | 2 +- .../model/enums/ExpiringContractStatus.java | 22 +- .../prime/model/enums/FcmMarginCallState.java | 2 +- .../prime/model/enums/FcmMarginCallType.java | 2 +- .../model/enums/FcmMarginHealthState.java | 30 +- .../prime/model/enums/FcmPositionSide.java | 2 +- .../enums/FcmTradingSessionClosedReason.java | 23 +- .../model/enums/FcmTradingSessionState.java | 34 +- .../prime/model/enums/FuturesSweepStatus.java | 2 +- .../prime/model/enums/HierarchyType.java | 5 +- .../prime/model/enums/InvoiceState.java | 6 +- .../prime/model/enums/InvoiceType.java | 6 +- .../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 +- .../prime/model/enums/OptionType.java | 37 + .../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 | 2 +- .../prime/model/enums/PrimeActivityType.java | 1 + .../model/enums/PrimeXMControlStatus.java | 19 +- .../model/enums/PrimeXMHealthStatus.java | 53 +- .../prime/model/enums/PrimeXMMarginLevel.java | 37 +- .../enums/PrimeXMMarginRequirementType.java | 15 +- .../enums/PrimeXMMarginThresholdType.java | 14 +- .../prime/model/enums/ProductPermissions.java | 1 + .../prime/model/enums/ProductType.java | 22 +- .../coinbase/prime/model/enums/RateType.java | 2 +- .../prime/model/enums/RewardSubtype.java | 57 +- .../prime/model/enums/RiskManagementType.java | 17 +- .../model/enums/SecondaryPermission.java | 19 +- .../prime/model/enums/SettlementModel.java | 36 + .../prime/model/enums/SettlementPeriod.java | 46 + .../prime/model/enums/SigningStatus.java | 14 +- .../prime/model/enums/SortDirection.java | 1 + .../coinbase/prime/model/enums/StakeType.java | 2 +- .../prime/model/enums/TimeInForceType.java | 26 +- .../prime/model/enums/TransactionStatus.java | 156 +- .../prime/model/enums/TransactionType.java | 208 +- .../model/enums/TransferLocationType.java | 36 +- .../prime/model/enums/TravelRuleStatus.java | 6 +- .../model/enums/TravelRuleWalletType.java | 17 +- .../prime/model/enums/UnstakeType.java | 2 +- .../coinbase/prime/model/enums/UserRole.java | 61 +- .../prime/model/enums/ValidatorProvider.java | 7 +- .../prime/model/enums/ValidatorStatus.java | 2 +- .../prime/model/enums/VisibilityStatus.java | 20 +- .../enums/WalletDepositInstructionType.java | 30 +- .../prime/model/enums/WalletType.java | 28 +- .../prime/model/enums/WalletVisibility.java | 2 +- .../prime/model/enums/XMCallStatus.java | 25 +- .../prime/model/enums/XMCallType.java | 19 +- .../prime/model/enums/XMControlStatus.java | 19 +- .../prime/model/enums/XMEntityCallStatus.java | 34 +- .../model/enums/XMLiquidationStatus.java | 32 +- .../prime/model/enums/XMMarginLevel.java | 37 +- .../coinbase/prime/model/enums/XMParty.java | 14 +- .../model-generator/.openapi-generator-ignore | 7 + tools/model-generator/pom.xml | 2 +- .../tools/modelgenerator/PostProcessor.java | 14 +- .../PostProcessorJavadocTest.java | 11 + 232 files changed, 33293 insertions(+), 15608 deletions(-) create mode 100644 src/main/java/com/coinbase/prime/model/BetaRewardsRateTier.java create mode 100644 src/main/java/com/coinbase/prime/model/ComboLeg.java create mode 100644 src/main/java/com/coinbase/prime/model/ConversionFee.java create mode 100644 src/main/java/com/coinbase/prime/model/ConversionFeeTier.java create mode 100644 src/main/java/com/coinbase/prime/model/CustomStablecoinAsset.java create mode 100644 src/main/java/com/coinbase/prime/model/DerivativePosition.java create mode 100644 src/main/java/com/coinbase/prime/model/DerivativesCurrencyBalance.java create mode 100644 src/main/java/com/coinbase/prime/model/OptionProductDetails.java create mode 100644 src/main/java/com/coinbase/prime/model/OptionsDetails.java create mode 100644 src/main/java/com/coinbase/prime/model/PriceIncrementStep.java create mode 100644 src/main/java/com/coinbase/prime/model/XMLiquidatedAsset.java create mode 100644 src/main/java/com/coinbase/prime/model/XMLiquidationDetail.java create mode 100644 src/main/java/com/coinbase/prime/model/XMLiquidationSummary.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/BetaRewardsRateTierType.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/DerivativeProductType.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/OptionType.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/SettlementModel.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/SettlementPeriod.java diff --git a/apiSpec/prime-public-spec.yaml b/apiSpec/prime-public-spec.yaml index d21e61e0..df368bc9 100644 --- a/apiSpec/prime-public-spec.yaml +++ b/apiSpec/prime-public-spec.yaml @@ -8,6 +8,1368 @@ servers: - url: https://api.prime.coinbase.com/ tags: - name: PrimeRESTAPI +- name: Error Codes + description: Global reference of error codes and subcodes returned by the Prime + REST API. + x-error-codes: + - name: RESOURCE_NOT_FOUND + httpStatus: 404 + description: The requested resource could not be found. + - name: VALIDATION_ERROR + httpStatus: 400 + description: One or more request fields are invalid or incompatible. + - name: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: A required request field was not provided. + - name: FAILED_PRECONDITION + httpStatus: 400 + description: The request could not be completed because a required precondition + was not met. + - name: AUTHENTICATION_FAILED + httpStatus: 401 + description: The request could not be authenticated. Check that the credentials + supplied with the request are valid. + - name: PERMISSION_DENIED + httpStatus: 403 + description: You do not have permission to perform this action with the current + API key. + - name: RATE_LIMIT_EXCEEDED + httpStatus: 429 + description: You have exceeded the request rate limit. Reduce your request rate + and retry after a backoff period. + - name: INTERNAL_ERROR + httpStatus: 500 + description: "An unexpected internal error occurred while processing the request.\ + \ If this persists, contact support." + - name: NOT_IMPLEMENTED + httpStatus: 501 + description: This endpoint or operation is not yet implemented. + - name: SERVICE_UNAVAILABLE + httpStatus: 503 + description: The service is temporarily unavailable. Retry the request after a + backoff period. + x-subcodes: + - name: AUTH_AUTHORIZATION_FAILED + errorCode: INTERNAL_ERROR + httpStatus: 500 + description: "An unexpected error occurred while authorizing the request. If this\ + \ persists, contact support." + - name: AUTH_RESOURCE_ACCESS_DENIED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: You do not have permission to access this resource with the current + API key. + - name: AUTH_RESOURCE_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: "No resource was found matching the request, or you do not have access\ + \ to it." + - name: AUTH_UNAUTHENTICATED + errorCode: AUTHENTICATION_FAILED + httpStatus: 401 + description: The request could not be authenticated. Check that the credentials + supplied with the request are valid. + - name: ENDPOINT_NOT_IMPLEMENTED + errorCode: NOT_IMPLEMENTED + httpStatus: 501 + description: This endpoint is not yet implemented. + - name: SERVER_MAINTENANCE_MODE_ACTIVE + errorCode: SERVICE_UNAVAILABLE + httpStatus: 503 + description: The API is currently in maintenance mode and not accepting this request. + Maintenance windows can be extended; check https://status.prime.coinbase.com + before retrying. + - name: SERVER_RATE_LIMIT_EXCEEDED + errorCode: RATE_LIMIT_EXCEEDED + httpStatus: 429 + description: You have exceeded the request rate limit for this endpoint. Reduce + your request rate and retry after a backoff period. + - name: MTLS_CERTIFICATE_REQUIRED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: A valid client certificate was not presented with the request. + - name: MTLS_CERTIFICATE_REVOKED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: The presented client certificate has been revoked. + - name: MTLS_CERTIFICATE_INVALID + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: The presented client certificate is not a valid identity for this + organization or environment. + - name: ENTITY_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The entity_id field is required but was not provided. + - name: ENTITY_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The entity_id is not a valid UUID. + - name: ENTITY_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No entity was found matching the provided entity_id. + - name: ENTITY_BALANCES_LIMIT_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The limit parameter for entity balances is out of the valid range. + - name: ENTITY_BALANCES_INVALID_ARGUMENT + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The entity balances request contains an invalid cursor or filter. + - name: ENTITY_BALANCES_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No balances were found for the requested entity. + - name: PORTFOLIO_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No portfolio was found matching the provided portfolio_id. + - name: PORTFOLIO_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The portfolio_id field is required but was not provided. + - name: PORTFOLIO_TYPE_UNSUPPORTED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The portfolio's type does not support this operation. + - name: PORTFOLIO_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The portfolio_id is not a valid UUID. + - name: PORTFOLIO_USERS_CURSOR_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The pagination cursor does not match any user in the result set. + - name: PORTFOLIO_USERS_LIMIT_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The limit parameter for portfolio users is out of the valid range. + - name: PORTFOLIO_BALANCES_INVALID_ARGUMENT + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The portfolio balances request contains an invalid cursor or filter. + - name: PORTFOLIO_BALANCES_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No balances were found for the requested portfolio. + - name: ALLOCATION_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The allocation_id field is required but was not provided. + - name: ALLOCATION_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The allocation_id field is not a valid UUID. + - name: ALLOCATION_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: "The requested allocation could not be found, either because it does\ + \ not exist or because the orders being allocated could not be retrieved." + - name: ALLOCATION_NETTING_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The netting_id field is required but was not provided. + - name: ALLOCATION_NETTING_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The netting_id field is not a valid UUID. + - name: ALLOCATION_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "One or more allocation request fields, such as product_id, order_ids,\ + \ allocation_legs, or size_type, are missing or invalid." + - name: ALLOCATION_START_DATE_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The start_date field is required when listing portfolio allocations. + - name: ALLOCATION_PRECONDITION_FAILED + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: The allocation could not be processed because buying power or account + information for the source or destination portfolio could not be retrieved. + - name: ALLOCATION_SOURCE_PORTFOLIO_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The source_portfolio_id field is required to identify the portfolio + the allocation is coming from. + - name: ALLOCATION_DESTINATION_PORTFOLIO_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: One or more entries in allocation_legs is missing a destination_portfolio_id. + - name: ALLOCATION_ORDERS_MIXED_SIDES + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The orders referenced in order_ids include both buy and sell sides. + All orders in a single allocation request must share the same side. + - name: ALLOCATION_ORDERS_MIXED_PRODUCTS + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The orders referenced in order_ids span more than one product. All + orders in a single allocation request must be for the same product_id. + - name: ALLOCATION_ORDER_NOT_TERMINAL + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "At least one order in order_ids has not reached a terminal state,\ + \ so it cannot be allocated until it finishes processing." + - name: ALLOCATION_ORDER_TOO_OLD + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: At least one order in order_ids exceeds the maximum age allowed for + allocation and can no longer be allocated. + - name: ALLOCATION_ORDER_ALREADY_ALLOCATED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: At least one order in order_ids has already been allocated and cannot + be allocated again. + - name: ALLOCATION_LIMIT_EXCEEDED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The limit field exceeds the maximum number of allocations that can + be returned in a single request. + - name: TRANSACTION_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: "The requested transaction could not be found for this portfolio,\ + \ or a transaction referenced in transaction_ids does not belong to it." + - name: TRANSACTION_TRAVEL_RULE_DATA_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No travel rule data is available for the specified transaction. + - name: TRANSACTION_TYPE_UNSUPPORTED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The transaction does not support the requested operation, such as\ + \ submitting travel rule data for a transaction that is not a deposit." + - name: TRANSACTION_TRAVEL_RULE_PARTY_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The originator or beneficiary information provided for the travel + rule submission is missing or fails identity validation. + - name: TRANSACTION_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The transaction_id field is required but was not provided. + - name: TRANSACTION_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The transaction_id field is not a valid UUID. + - name: TRANSACTION_LIMIT_EXCEEDED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The limit field exceeds the maximum number of transactions that can + be returned in a single request. + - name: TRANSACTION_SERVICE_UNAVAILABLE + errorCode: SERVICE_UNAVAILABLE + httpStatus: 503 + description: The transaction data needed to fulfill this request is temporarily + unavailable. + - name: TRANSACTION_CURSOR_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The cursor field is not a valid pagination token. Omit it or use + the cursor value returned from a previous response. + - name: TRANSACTION_TRAVEL_RULE_STATUS_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The travel_rule_status filter contains a value that is not recognized. + - name: TRANSACTION_FILTER_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The combination of request filters is invalid, such as specifying\ + \ symbols together with the ONCHAIN_TRANSACTION type." + - name: TRANSACTION_IDS_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "One or more values in transaction_ids are missing, exceed the maximum\ + \ allowed count, or are not valid UUIDs." + - name: TRANSACTION_PARAMS_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "One or more request parameters, such as portfolio_id, transaction_ids,\ + \ cursor, or limit, failed validation." + - name: FINANCING_START_DATE_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The start_date field is required but was not provided. + - name: FINANCING_END_DATE_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The end_date field is required but was not provided. + - name: FINANCING_START_DATE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The start_date value is not a valid RFC 3339 timestamp. + - name: FINANCING_END_DATE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The end_date value is not a valid RFC 3339 timestamp. + - name: FINANCING_PORTFOLIO_MARGIN_NOT_ENABLED + errorCode: AUTHENTICATION_FAILED + httpStatus: 401 + description: "Portfolio margin is not enabled for the requested portfolio or entity,\ + \ so this financing endpoint cannot return data." + - name: FINANCING_ACCRUALS_INVALID_ARGUMENT + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "One or more parameters in the interest accruals request are invalid,\ + \ such as entity_id, portfolio_id, start_date, or end_date." + - name: FINANCING_ACCRUALS_DATE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The start_date to end_date range provided for interest accruals is + not valid for the requested portfolio. + - name: BUYING_POWER_BASE_CURRENCY_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The base_currency field is required but was not provided. + - name: BUYING_POWER_QUOTE_CURRENCY_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The quote_currency field is required but was not provided. + - name: BUYING_POWER_CURRENCY_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The requested currency pair is not valid or not supported for buying + power. + - name: BUYING_POWER_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No buying power data was found for the requested portfolio and currency + pair. + - name: BUYING_POWER_PERMISSION_DENIED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: You do not have permission to view buying power for the requested + portfolio and currency pair. + - name: BUYING_POWER_FAILED_PRECONDITION + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The buying power request failed a precondition, such as the portfolio\ + \ not being in a state that supports the requested currency pair." + - name: CROSS_MARGIN_NOT_ENABLED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: Cross margin is not enabled for the requested entity. + - name: CROSS_MARGIN_INVALID_ARGUMENT + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The cross margin or funding settings request contains an invalid\ + \ argument, such as a portfolio_id, entity_id, or liquidation_id that does not\ + \ belong to the specified entity." + - name: CROSS_MARGIN_FAILED_PRECONDITION + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The cross margin or funding settings request failed a precondition,\ + \ such as the entity or portfolio not being in a state that supports the requested\ + \ operation." + - name: LOCATE_DATE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The locate_date value is not a valid YYYY-MM-DD date. + - name: LOCATE_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The stock locate request is invalid — for example, both locate_date\ + \ and locate_ids are missing, or the requested locate_date is in the past or\ + \ too far in the future." + - name: LOCATE_IDS_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: One or more values in locate_ids are not valid UUIDs. + - name: LOCATE_FAILED_PRECONDITION + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: "The stock locate request failed a precondition, such as no availability\ + \ for the requested currency or portfolio margin not being enabled." + - name: LOCATE_DATE_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The locate_date field is required but was not provided. + - name: MARGIN_SUMMARY_RANGE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The requested start_date to end_date range exceeds the maximum trailing + period of 3 months for margin summaries. + - name: FINANCING_SERVICE_UNAVAILABLE + errorCode: SERVICE_UNAVAILABLE + httpStatus: 503 + description: Financing data cannot be retrieved right now. This is a service-wide + condition unrelated to your request or account. + - name: MARGIN_CONVERSION_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "One or more parameters in the margin conversions request are invalid,\ + \ such as portfolio_id, start_date, or end_date." + - name: LOCATE_AVAILABILITY_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No locate availability data was found for the requested entity and + date. + - name: MARGIN_INFORMATION_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "One or more parameters in the margin information request are invalid,\ + \ such as entity_id." + - name: MARGIN_CONVERSION_FAILED_PRECONDITION + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The margin conversions request failed a precondition, such as the\ + \ portfolio not being in a state that supports margin conversions." + - name: MARGIN_SUMMARY_FAILED_PRECONDITION + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The margin summaries request failed a precondition, such as the\ + \ entity not being in a state that supports margin summaries." + - name: FUNDING_SETTINGS_EXCESS_TARGET_AMOUNT_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The excess_funds_target_amount field is missing, is not a valid\ + \ decimal number, or is negative." + - name: FINANCING_WITHDRAWAL_POWER_INVALID_ARGUMENT + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "One or more parameters in the withdrawal power request are invalid,\ + \ such as portfolio_id or symbol." + - name: FINANCING_WITHDRAWAL_POWER_SYMBOL_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The symbol field is required but was not provided. + - name: FINANCING_PTC_DISABLED_FOR_PM_ENTITY + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: Post-trade credit information is not available for this portfolio + because its entity has portfolio margin enabled. + - name: FINANCING_FAILED_PRECONDITION + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: "The interest accruals request failed a precondition, such as an\ + \ invalid date range for the requested entity or portfolio." + - name: FINANCING_ACCRUALS_RANGE_EXCEEDED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The requested start_date to end_date range exceeds the maximum trailing + period of 12 months for interest accruals. + - name: TIERED_PRICING_EFFECTIVE_AT_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The effective_at value is not a valid RFC 3339 timestamp. + - name: TIERED_PRICING_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "One or more parameters in the tiered pricing request are invalid,\ + \ such as entity_id or effective_at." + - name: TIERED_PRICING_FAILED_PRECONDITION + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: "The tiered pricing request failed a precondition, such as the entity\ + \ not being enabled for tiered pricing." + - name: LOCATE_SYMBOL_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The symbol field is required but was not provided. + - name: LOCATE_AMOUNT_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The amount field is required but was not provided. + - name: REWARDS_API_FEATURE_DISABLED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: The Rewards Rate API is not enabled for this entity or portfolio. + - name: REWARDS_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The rewards rate request is invalid. + - name: REWARDS_ENTITY_NOT_ENROLLED + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: The entity is not enrolled in Prime Rewards. + - name: CANDLE_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The request for candle data is invalid because a field, such as\ + \ start_time or end_time, is missing or malformed." + - name: CANDLE_TIME_RANGE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The requested start_time and end_time combination is not a valid + candle time range for the given granularity. + - name: PRODUCT_FUTURES_NOT_ENABLED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: Futures products are not enabled for the specified portfolio_id. + - name: PRODUCT_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No products were found matching the requested criteria. + - name: PRODUCT_LIMIT_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The limit field must be a positive number. + - name: PRODUCT_OPTIONS_NOT_ENABLED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: Options products are not enabled for the specified portfolio_id. + - name: ACTIVITY_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: "The requested activity could not be found, either because the activity_id\ + \ does not exist or it does not belong to the specified portfolio_id." + - name: ACTIVITY_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The activity request contains an invalid argument, such as a malformed\ + \ filter or identifier." + - name: ACTIVITY_ACCESS_DENIED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: You do not have permission to access the requested activity data + for the given entity or portfolio. + - name: ACTIVITY_CATEGORY_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The categories field contains a value that is not a supported activity + category. + - name: ACTIVITY_TIME_RANGE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The start_time or end_time field is not a valid RFC 3339 timestamp,\ + \ or end_time is earlier than start_time." + - name: ACTIVITY_STATUS_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The statuses field contains a value that is not a supported activity + status. + - name: ACTIVITY_PORTFOLIO_ID_MISMATCH + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The requested activity exists but does not belong to the portfolio_id + provided in the request. + - name: ASSET_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: "The requested asset could not be found, for example because the\ + \ currency symbol or asset identifier does not correspond to a supported asset." + - name: ASSET_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The asset lookup request contains an invalid argument, such as an\ + \ unsupported currency symbol or malformed asset identifier." + - name: ASSET_SERVICE_UNAVAILABLE + errorCode: SERVICE_UNAVAILABLE + httpStatus: 503 + description: Asset information could not be retrieved at this time. + - name: ADDRESS_BOOK_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: The requested address book entry could not be found for the given + portfolio_id. + - name: ADDRESS_BOOK_INVALID_ARGUMENT + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The address book request contains an invalid argument, such as a\ + \ malformed address or currency_symbol." + - name: ADDRESS_BOOK_FAILED_PRECONDITION + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The address book entry could not be created or retrieved because + a precondition was not met. + - name: ADDRESS_BOOK_ADDRESS_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The address field is required to create an address book entry. + - name: ADDRESS_BOOK_CURRENCY_SYMBOL_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The currency_symbol field is required to create an address book entry. + - name: ADDRESS_BOOK_NAME_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The name field is required to create an address book entry. + - name: PAYMENT_METHOD_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The payment_method_id field is required but was not provided. + - name: PAYMENT_METHOD_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The payment_method_id field is not a valid identifier. + - name: PAYMENT_METHOD_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: "The requested payment method could not be found, either because\ + \ the payment_method_id does not exist or it does not belong to the specified\ + \ entity_id." + - name: PAYMENT_METHOD_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The payment method request contains an invalid argument. + - name: ENTITY_POSITION_LIMIT_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The limit field must be greater than 0 and no greater than the maximum + allowed value. + - name: ENTITY_POSITION_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No position data was found for the given entity or portfolio. + - name: ENTITY_POSITION_INVALID_ARGUMENT + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The position request contains an invalid argument, such as a malformed\ + \ portfolio_id or other filter." + - name: FCM_BALANCE_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No futures balance data was found for the given entity_id. + - name: FCM_INVALID_ARGUMENT + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The request contained an invalid argument for this futures operation,\ + \ such as an unrecognized entity_id or an invalid amount or currency." + - name: FCM_EQUITY_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No end-of-day equity data was found for the futures account associated + with the given entity_id. + - name: FCM_RISK_LIMITS_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No risk limit data was found for the futures account associated with + the given entity_id. + - name: FCM_SWEEP_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: "No sweep request was found for the given entity_id, including when\ + \ there is no pending sweep available to cancel." + - name: FCM_SWEEP_CURRENCY_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The currency field is required when scheduling a futures sweep. + - name: FCM_TARGET_DERIVATIVES_EXCESS_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The target_derivatives_excess field must be a valid, non-negative\ + \ decimal value." + - name: FCM_ACCOUNT_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No futures (FCM) account is configured for the given entity_id. + - name: API_KEY_INVALID_DURATION + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The duration_seconds field exceeds the maximum allowed rotation timespan + of 30 days. + - name: API_KEY_ALREADY_ROTATED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: A rotation has already been initiated for this API key. Only one + rotation may be pending at a time. + - name: MARKET_DATA_INVALID_ARGUMENT + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The request contained an invalid argument, such as an unrecognized\ + \ entity_id, cursor, or sort_direction." + - name: MARKET_DATA_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No market data was found for the given entity_id. + - name: WALLET_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The wallet_id field is required but was not included in the request. + - name: WALLET_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The wallet_id field is not a valid UUID. + - name: WALLET_TYPE_NOT_SUPPORTED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The wallet's type does not support this operation. + - name: WALLET_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: "No wallet was found matching the provided wallet_id, or it does\ + \ not belong to the specified portfolio." + - name: WALLET_SERVICE_UNAVAILABLE + errorCode: SERVICE_UNAVAILABLE + httpStatus: 503 + description: "The service needed to fetch or process wallet data is temporarily\ + \ unavailable, or wallet balances could not be resolved." + - name: WALLET_DEPOSIT_TYPE_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The deposit_type field is required but was not provided. + - name: WALLET_METADATA_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The metadata field is not a valid JSON object, or a nested value\ + \ within it is not a JSON object with string values." + - name: WALLET_NETWORK_REQUIRED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: A network must be specified for crypto deposits because the wallet + does not have a default network configured. + - name: WALLET_NOT_DEPOSITABLE + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: The wallet cannot accept deposits. + - name: WALLET_DEPOSIT_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The deposit request is invalid or not supported for this wallet. + - name: WALLET_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The request contains an invalid argument for this wallet operation. + - name: WALLET_ONCHAIN_SYMBOLS_NOT_ALLOWED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The symbols filter cannot be set when the wallet type is ONCHAIN. + - name: WALLET_FAILED_PRECONDITION + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: "The wallet request failed a precondition, such as the wallet not\ + \ being able to accept the requested action." + - name: WALLET_NETWORK_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The network_id field is required but was not provided. + - name: WALLET_NETWORK_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The network identifier is malformed. It must be in the format {network_id}-{network_type}\ + \ (e.g. base-mainnet), with no spaces, and each part no longer than 20 characters." + - name: WALLET_ONCHAIN_SETUP_UNAVAILABLE + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: "Onchain wallet setup for this network family has not been completed\ + \ yet, and must be done through the Prime web application before creating this\ + \ wallet via the API." + - name: WALLET_NAME_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The name field is required but was not provided. + - name: WALLET_SYMBOL_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The symbol field is required for wallet types other than ONCHAIN. + - name: WALLET_NETWORK_FAMILY_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The network_family field is required when wallet_type is ONCHAIN. + - name: WALLET_NETWORK_FAMILY_NOT_ALLOWED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The network_family field must not be set when wallet_type is not + ONCHAIN. + - name: WALLET_BALANCES_LIMIT_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The limit field is outside the allowed range for this request. + - name: WALLET_VISIBILITY_STATUSES_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The visibility_statuses filter contains more values than are allowed. + - name: WALLET_NETWORK_TYPE_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The type field on the network object is required but was not provided. + - name: WALLET_NETWORK_TYPE_NOT_SUPPORTED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The network type portion of network_id is not a supported value for + this environment. + - name: WALLET_EXTERNAL_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The external_id field is not valid UTF-8, or exceeds 255 bytes." + - name: WALLET_AMOUNT_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The amount field is required but was not provided. + - name: WALLET_IDEMPOTENCY_KEY_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The idempotency_key field is required but was not provided. + - name: WALLET_IDEMPOTENCY_KEY_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The idempotency_key field is not a valid UUID. + - name: WALLET_CURRENCY_SYMBOL_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The currency_symbol field is required but was not provided. + - name: WALLET_TRANSFER_DESTINATION_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The destination wallet ID is required for an internal wallet transfer. + - name: WALLET_TRANSFER_DESTINATION_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The destination wallet ID is not a valid UUID, or is the same as\ + \ the source wallet_id." + - name: WALLET_PORTFOLIO_CREDIT_FROZEN + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: "The portfolio's credit is frozen, preventing this transaction. Contact\ + \ support to resolve this." + - name: WALLET_DESTINATION_TYPE_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The destination_type field is required but was not provided. + - name: WALLET_DESTINATION_TYPE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The destination_type field is not a supported value for this operation. + - name: WALLET_COUNTERPARTY_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The counterparty_id field is required when destination_type is a + counterparty destination. + - name: ORDER_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The order_id field is missing from the request. + - name: ORDER_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The order_id provided is not a valid UUID. + - name: ORDER_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: No order was found matching the provided order_id. + - name: ORDER_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The order request failed validation, such as an invalid stp_id,\ + \ price, size, or commission_rate." + - name: ORDER_STATUS_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The requested order_status values include non-terminal statuses\ + \ (such as OPEN or PENDING), which this endpoint does not support. Use the Open\ + \ Orders endpoint, or the Websocket/FIX API, to retrieve non-terminal orders." + - name: ORDER_LIMIT_EXCEEDED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The query would return more results than this endpoint allows. Narrow + the query or use the Websocket API for a full stream of results. + - name: ORDER_FILLS_LIMIT_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The limit field for a fills query is outside the allowed range of + 1 to 3000. + - name: ORDER_FILLS_START_DATE_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The start_date field is required for this fills query. + - name: ORDER_FILLS_START_DATE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The start_date field is not a valid timestamp. + - name: ORDER_FILLS_END_DATE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The end_date field is not a valid timestamp. + - name: ORDER_TYPE_BLOCK_UNSUPPORTED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: Orders of type BLOCK cannot be created or previewed through this + endpoint. + - name: ORDER_TYPE_RFQ_UNSUPPORTED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: Orders of type RFQ cannot be created or previewed through this endpoint. + Use the RFQ (/rfq) and accept quote (/accept_quote) endpoints instead. + - name: ORDER_FOK_NOT_ENABLED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The FILL_OR_KILL time-in-force is not enabled for this portfolio. + - name: ORDER_STOP_LIMIT_NOT_ENABLED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: STOP_LIMIT orders are not enabled for this portfolio. + - name: ORDER_PEG_NOT_ENABLED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: PEG orders are not enabled for this portfolio. + - name: ORDER_DUPLICATE_CLIENT_ORDER_ID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: An order with this client_order_id already exists. Use a unique client_order_id + for each new order. + - name: ORDER_REJECTED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The order was rejected during processing and was not placed. + - name: ORDER_PRODUCT_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The product_id is not a valid or currently tradable product for this + request. + - name: ORDER_TYPE_NOT_ALLOWED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The requested order type is not allowed on this endpoint (for example,\ + \ BLOCK or RFQ orders submitted via CreateOrder)." + - name: ORDER_TIF_NOT_ENABLED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The requested time_in_force (such as FILL_OR_KILL) is not enabled + for this portfolio. + - name: ORDER_FAILED_PRECONDITION + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: "The order request could not be completed because a required precondition\ + \ was not met, for example an account needed to process the order could not\ + \ be found or created." + - name: ORDER_SERVICE_UNAVAILABLE + errorCode: SERVICE_UNAVAILABLE + httpStatus: 503 + description: The trading service needed to process this order request is temporarily + unavailable. + - name: ORDER_RFQ_NOT_ENABLED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: This portfolio is not allowed to submit RFQ (request-for-quote) requests. + - name: ORDER_CANCEL_NOT_ALLOWED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: This order is not allowed to be canceled. + - name: ORDER_FULLY_FILLED + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: The order is fully filled and can no longer be canceled. + - name: ORDER_BEING_REPLACED + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: The order is currently being replaced (edited) and cannot be canceled + while that is in progress. + - name: ORDER_CANCEL_DUPLICATE + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: A cancel request for this order has already been submitted and is + still being processed. + - name: ORDER_SESSION_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The FCM trading session associated with this order is not valid for + the requested cancel operation. + - name: ORDER_PRODUCT_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The product_id field is required for this request. + - name: ORDER_CLIENT_ORDER_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The client_order_id field is required to accept a quote. + - name: ORDER_QUOTE_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The quote_id field is required to accept a quote. + - name: ORDER_SIDE_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The side field is required and was not provided. + - name: ORDER_RESOURCE_NOT_FOUND + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: No order matching the given order_id was found for this portfolio. + - name: ORDER_SIDE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The side field is not a supported order side. Specify BUY or SELL. + - name: ORDER_SIZE_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The order size is missing. Specify either base_quantity or quote_value. + - name: ORDER_SIZE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The order size is invalid, either because it could not be parsed\ + \ as a number or because both base_quantity and quote_value were specified." + - name: ORDER_DISPLAY_SIZE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The display size is invalid, either because both display size fields\ + \ were specified or because the display size field does not match the currency\ + \ of the order size." + - name: ORDER_PRICE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The order price is invalid, either because limit_price could not\ + \ be parsed as a number or because a limit price was supplied for a market order." + - name: ORDER_STOP_PRICE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The stop_price for a STOP_LIMIT order is missing or could not be + parsed as a number. + - name: ORDER_TIME_IN_FORCE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The time_in_force value is not compatible with the requested order + type or post-only flag. + - name: ORDER_TIME_RANGE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The order is missing a start_time or end_time required for its order + type or time-in-force. + - name: ORDER_PEG_OFFSET_TYPE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The peg_offset_type is not a supported value for a PEG order. + - name: ORDER_CLIENT_QUOTE_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The client_quote_id field is required for a quote request. + - name: ORDER_QUOTE_DURATION_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The quote_duration_ms field is outside the allowed range. + - name: ORDER_RFQ_SIQ_NOT_ENABLED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: Size-in-quote RFQ requests are not enabled for this portfolio. + - name: CONVERSION_FEE_FEATURE_DISABLED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: The conversion fees API is not enabled for this entity. + - name: CONVERSION_FEE_NOT_ENABLED_FOR_ORG + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: Stablecoin conversion fee configuration has not been set up for this + entity's owning organization. + - name: CONVERSION_DESTINATION_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The destination field is not a valid UUID. + - name: CONVERSION_IDEMPOTENCY_KEY_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The idempotency_key field is not a valid UUID. + - name: CONVERSION_AMOUNT_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The amount field is not a valid decimal number. + - name: CONVERSION_SOURCE_SYMBOL_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The source_symbol field is required but was not provided. + - name: CONVERSION_DESTINATION_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The destination field is required but was not provided. + - name: CONVERSION_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The conversion request was rejected as invalid, for example due\ + \ to an unsupported asset pair or a duplicate transaction." + - name: CONVERSION_FAILED_PRECONDITION + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: "The conversion could not be completed because a required condition\ + \ was not met, such as insufficient available balance in the source wallet." + - name: CONVERSION_PERMISSION_DENIED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: You do not have permission to convert funds using the specified wallet_id + or portfolio. + - name: CONVERSION_WALLET_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: "The wallet identified by wallet_id or destination could not be found,\ + \ or does not belong to the specified portfolio_id." + - name: STAKING_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The staking, unstaking, or claim-rewards request contained an invalid\ + \ parameter, such as an unsupported amount, address, option, or allocation." + - name: STAKING_CURRENCY_UNSUPPORTED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The requested currency or wallet's asset is not supported for this + staking operation. + - name: STAKING_NOT_ENABLED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: Wallet-level staking has not been enabled for this portfolio. + - name: STAKING_PRECONDITION_FAILED + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: "The requested staking, unstaking, or claim-rewards action is not\ + \ currently allowed for this wallet." + - name: STAKING_SERVICE_UNAVAILABLE + errorCode: SERVICE_UNAVAILABLE + httpStatus: 503 + description: The staking service could not process the request after repeated + attempts. + - name: STAKING_VALIDATOR_ALLOCATIONS_NOT_ENABLED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: The validator_allocations field is not enabled for this portfolio. + - name: STAKING_AMOUNT_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The amount field is required but was not provided. + - name: STAKING_AMOUNT_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The amount field is not a valid positive decimal number, or does\ + \ not match the sum of the provided validator allocation amounts." + - name: STAKING_INSUFFICIENT_BALANCE + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The wallet has no stakeable, unbondable, or claimable balance available\ + \ for this operation." + - name: STAKING_WALLET_OR_PORTFOLIO_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The wallet_id does not exist, is not a valid identifier, or does\ + \ not belong to the given portfolio_id." + - name: STAKING_AMOUNT_EXCEEDS_UNBONDABLE_BALANCE + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The requested unstake amount is greater than the wallet's, validator's,\ + \ or portfolio's available unbondable balance." + - name: STAKING_WALLET_COLD_ADDRESS_NOT_FOUND + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The wallet does not have a cold address on record, which is required\ + \ to complete this staking operation." + - name: STAKING_NO_VALIDATORS_AVAILABLE + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: No Coinbase-operated validators are currently available for the requested + currency. + - name: STAKING_END_DATE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The end_date field is not a valid date in YYYY-MM-DD format. + - name: STAKING_DELEGATED_ADDRESS_NOT_FOUND + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The wallet has no delegated-to address on record, which is required\ + \ for this currency's staking flow." + - name: STAKING_CUSTOM_AMOUNT_NOT_SUPPORTED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: A custom amount cannot be specified for this currency and action + combination. + - name: STAKING_VALIDATOR_ADDRESS_NOT_SUPPORTED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: A custom validator_address cannot be specified for this currency. + - name: STAKING_VALIDATOR_ALLOCATIONS_UNSUPPORTED_CURRENCY + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The validator_allocations field is only supported for ETH unstaking. + - name: STAKING_VALIDATOR_ALLOCATION_INCOMPLETE + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: Each entry in validator_allocations must include both a validator_address + and an amount. + - name: STAKING_VALIDATOR_NOT_ELIGIBLE + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The specified validator_address does not belong to this wallet or + is not eligible for validator allocations. + - name: STAKING_DESTINATION_ADDRESS_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The resolved destination address for this staking, unstaking, or\ + \ claim-rewards action is empty or malformed." + - name: STAKING_ACTION_TYPE_UNSUPPORTED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The action_type field is not a supported staking action (initiate,\ + \ unstake, or claim rewards)." + - name: STAKING_UNSTAKE_NOT_AVAILABLE + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: A full unstake is not currently available for this wallet. + - name: STAKING_NO_ELIGIBLE_WALLETS + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: No wallet eligible for staking or unstaking was found for the given + portfolio_id and currency_symbol. + - name: STAKING_BALANCE_NOT_FOUND + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: No balance could be found for the requested currency_symbol on this + portfolio. + - name: STAKING_AMOUNT_EXCEEDS_BONDABLE_BALANCE + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The requested amount to stake exceeds the portfolio's available bondable + balance for the given currency. + - name: STAKING_PROVIDER_UNSTAKE_NOT_ENABLED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: Provider-level unstaking (unstaking all validators for a given validator_provider) + is not enabled for this portfolio. + - name: STAKING_PROVIDER_NO_UNBONDABLE_BALANCE + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: No unbondable balance is currently available for the specified validator_provider + on this portfolio and currency. + - name: STAKING_IDEMPOTENCY_KEY_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The idempotency_key field is required for this staking or unstaking + operation. + - name: STAKING_IDEMPOTENCY_KEY_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The idempotency_key provided is not a valid UUID. + - name: STAKING_CURRENCY_SYMBOL_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The currency_symbol field is required for this staking or unstaking + operation. + - name: STAKING_AMOUNT_VALIDATOR_PROVIDER_CONFLICT + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The amount and validator_provider fields are mutually exclusive; + specify at most one. + - name: STAKING_VALIDATOR_PROVIDER_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The validator_provider field is required for a provider-scoped unstake + request. + - name: STAKING_VALIDATOR_PROVIDER_NOT_SUPPORTED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The validator_provider value provided is not a supported provider. + - name: COMMISSION_PRODUCT_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The product_id is not a recognized trading pair. + - name: COMMISSION_TRADING_NOT_ENABLED + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The portfolio_id belongs to a portfolio that is not enabled for\ + \ trading, so a trading commission rate cannot be calculated for it." + - name: ADVANCED_TRANSFER_NOT_ENABLED + errorCode: PERMISSION_DENIED + httpStatus: 403 + description: "Advanced Transfers are not enabled for this portfolio, or the specific\ + \ transfer configuration requested is not enabled for this portfolio." + - name: ADVANCED_TRANSFER_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The advanced transfer request is malformed or fails validation,\ + \ such as a missing portfolio_id, a missing or unsupported transfer type, or\ + \ an invalid fund movement." + - name: ADVANCED_TRANSFER_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The advanced_transfer_id provided does not correspond to a transfer + that can be cancelled. + - name: ADVANCED_TRANSFER_CANCEL_PRECONDITION_FAILED + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: The advanced transfer cannot be cancelled because it is no longer + in a cancellable state. + - name: ADVANCED_TRANSFER_PRECONDITION_FAILED + errorCode: FAILED_PRECONDITION + httpStatus: 400 + description: "The advanced transfer cannot be processed because a precondition\ + \ was not met, such as no wallet being available in the portfolio for one of\ + \ the fund movement currencies." + - name: ADVANCED_TRANSFER_SERVICE_UNAVAILABLE + errorCode: SERVICE_UNAVAILABLE + httpStatus: 503 + description: The service needed to process this advanced transfer request is currently + unavailable or has reached a rate limit. + - name: ADVANCED_TRANSFER_DATE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The settlement_date, settlement_time, or trade_date field is not\ + \ in the expected format." + - name: ADVANCED_TRANSFER_NOT_FOUND + errorCode: RESOURCE_NOT_FOUND + httpStatus: 404 + description: A resource referenced by the advanced transfer request could not + be found. + - name: ADVANCED_TRANSFER_TOO_MANY_FUND_MOVEMENTS + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The advanced transfer includes more fund movements than the maximum + number of legs allowed per transfer. + - name: ADVANCED_TRANSFER_COUNTERPARTY_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The fund movements in this advanced transfer do not all settle against + the same counterparty; all legs must share a single counterparty. + - name: ADVANCED_TRANSFER_AMOUNT_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The amount on one or more fund movements is not a valid positive + decimal value. + - name: ADVANCED_TRANSFER_COUNTERPARTY_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: One or more fund movements is missing its counterparty identifier. + - name: ONCHAIN_TRANSACTION_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The onchain transaction request failed validation because of an\ + \ invalid parameter, an unsupported wallet type, or a malformed evm_params value." + - name: ONCHAIN_ADDRESS_GROUP_REQUEST_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The onchain address group create, update, or delete request contained\ + \ invalid data and could not be processed." + - name: ONCHAIN_TRANSACTION_RAW_UNSIGNED_TXN_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The raw_unsigned_txn field is required but was not provided. + - name: ONCHAIN_TRANSACTION_RAW_UNSIGNED_TXN_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The raw_unsigned_txn field is not a valid hex-encoded string. + - name: ONCHAIN_TRANSACTION_EVM_PARAMS_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The evm_params field is required when the destination wallet is on + an EVM-based network. + - name: ONCHAIN_TRANSACTION_EVM_PARAMS_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The evm_params field was provided but the destination wallet is\ + \ on a non-EVM network, such as Solana, where EVM-specific parameters are not\ + \ supported." + - name: ONCHAIN_TRANSACTION_REPLACED_TRANSACTION_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The replaced_transaction_id field is not a valid transaction identifier. + - name: ONCHAIN_TRANSACTION_DISABLE_DYNAMIC_NONCE_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: The disable_dynamic_nonce field must be false when replaced_transaction_id + is set to replace an existing transaction. + - name: ONCHAIN_TRANSACTION_CHAIN_ID_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The chain_id field is required within evm_params for transactions + on EVM-based networks. + - name: ONCHAIN_TRANSACTION_CHAIN_ID_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The chain_id field is not a valid integer, or it must be 1 when\ + \ using the Flashbots RPC endpoint." + - name: ONCHAIN_TRANSACTION_NETWORK_NAME_REQUIRED + errorCode: REQUIRED_FIELD_MISSING + httpStatus: 400 + description: The network_name field is required when submitting a transaction + through a custom RPC endpoint. + - name: ONCHAIN_TRANSACTION_RPC_URL_INVALID + errorCode: VALIDATION_ERROR + httpStatus: 400 + description: "The custom RPC endpoint provided cannot be used, either because\ + \ the wallet is not on an EVM-based network or because the call to that endpoint\ + \ failed." paths: /v1/activities/{activity_id}: get: @@ -31,6 +1393,38 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetActivityResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetActivityForbiddenErrorResponse' + "404": + description: The requested activity was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetActivityNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/allocations: post: tags: @@ -51,6 +1445,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CreateAllocationResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAllocationBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAllocationForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAllocationNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/allocations/net: post: @@ -72,7 +1504,145 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CreateNetAllocationResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNetAllocationBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNetAllocationForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNetAllocationNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + x-codegen-request-body-name: body + /v1/api-keys/rotate: + post: + tags: + - API Key Management + summary: Rotate API Key + description: Generates a new API key with the same configuration as the invoking + key. + operationId: PrimeRESTAPI_RotateAPIKey + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.RotateAPIKeyRequest' + required: true + responses: + "200": + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.RotateAPIKeyResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.RotateAPIKeyBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.RotateAPIKeyForbiddenErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "501": + description: This endpoint is not implemented. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.NotImplementedErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body + /v1/conversion/fees: + get: + tags: + - Financing + summary: Get Conversion Fees + description: "Get your organization's stablecoin conversion fee tiers and month-to-date\ + \ net conversion volume per currency. The organization is resolved from the\ + \ authenticated API key, which must be organization-scoped." + operationId: PrimeRESTAPI_GetConversionFees + responses: + "200": + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetConversionFeesResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetConversionFeesForbiddenErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/accruals: get: tags: @@ -110,6 +1680,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetInterestAccrualsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInterestAccrualsBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInterestAccrualsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInterestAccrualsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/activities: get: tags: @@ -154,7 +1762,6 @@ paths: items: type: string enum: - - OTHER_ACTIVITY_CATEGORY - ACTIVITY_CATEGORY_ORDER - ACTIVITY_CATEGORY_TRANSACTION - ACTIVITY_CATEGORY_ACCOUNT @@ -170,7 +1777,6 @@ paths: items: type: string enum: - - OTHER_ACTIVITY_STATUS - ACTIVITY_STATUS_CANCELLED - ACTIVITY_STATUS_PROCESSING - ACTIVITY_STATUS_COMPLETED @@ -220,6 +1826,43 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityActivitiesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityActivitiesBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityActivitiesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityActivitiesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/aggregate_positions: get: tags: @@ -252,6 +1895,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ListAggregateEntityPositionsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAggregateEntityPositionsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAggregateEntityPositionsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAggregateEntityPositionsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/assets: get: tags: @@ -273,6 +1947,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityAssetsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityAssetsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityAssetsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityAssetsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/balances: get: tags: @@ -329,6 +2034,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityBalancesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityBalancesBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityBalancesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityBalancesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/cross_margin: get: tags: @@ -350,71 +2086,291 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginOverviewResponse' - /v1/entities/{entity_id}/cross_margin/risk_parameters: + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginOverviewBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginOverviewForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginOverviewNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + /v1/entities/{entity_id}/cross_margin/liquidation: get: tags: - Financing - summary: Get Cross Margin Risk Parameters - description: Gets the current Cross Margin (XM) risk parameters for an entity. - operationId: PrimeRESTAPI_GetCrossMarginRiskParameters + summary: Get Cross Margin Liquidation + description: Gets detailed liquidation data for an XM customer. Returns the + active or most recent liquidation by default. + operationId: PrimeRESTAPI_GetXMLiquidation parameters: - name: entity_id in: path - description: XM customer Prime Entity ID. + description: XM customer Prime Entity ID required: true schema: type: string + - name: liquidation_id + in: query + description: "Financing liquidation UUID. If omitted, returns the active or\ + \ most recent liquidation." + 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: + $ref: '#/components/schemas/coinbase.public_rest_api.GetXMLiquidationResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetXMLiquidationBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetXMLiquidationForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetXMLiquidationNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + /v1/entities/{entity_id}/cross_margin/liquidations: + get: 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 + summary: List Cross Margin Liquidations + description: Lists historical liquidation records for an XM customer + operationId: PrimeRESTAPI_ListXMLiquidations parameters: - name: entity_id in: path - description: Prime Entity ID + description: XM customer 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)." + - 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 + - name: status + in: query + description: |- + Filter results by liquidation status + + - 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 + schema: + type: string + enum: + - XM_LIQUIDATION_STATUS_PRE_LIQUIDATION + - XM_LIQUIDATION_STATUS_LIQUIDATING + - XM_LIQUIDATION_STATUS_LIQUIDATED + - XM_LIQUIDATION_STATUS_CANCELED + - XM_LIQUIDATION_STATUS_FAILED + - name: start_time + in: query + description: Filter results to liquidations created at or after this time + schema: + type: string + format: date-time + - name: end_time + in: query + description: Filter results to liquidations created at or before this time + schema: + type: string + format: date-time + responses: + "200": + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListXMLiquidationsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListXMLiquidationsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListXMLiquidationsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListXMLiquidationsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + /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' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginRiskParametersBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginRiskParametersForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginRiskParametersNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + /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 + - 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)" + description: "Deprecated: Auto-Initiate Loans is now always enabled\ + \ for Financing customers. Any value sent for this field is ignored." automatic_excess_return_enabled: type: boolean description: "When true, any FCM account balance above your margin\ @@ -434,6 +2390,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.UpdateFundingSettingsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateFundingSettingsBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateFundingSettingsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateFundingSettingsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/entities/{entity_id}/futures/auto_sweep: post: @@ -469,6 +2463,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.SetAutoSweepResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SetAutoSweepBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SetAutoSweepForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SetAutoSweepNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/entities/{entity_id}/futures/balance_summary: get: @@ -491,6 +2516,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmBalanceResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmBalanceBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmBalanceForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmBalanceNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/futures/equity: get: tags: @@ -512,6 +2568,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmEquityResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmEquityBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmEquityForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmEquityNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/futures/margin_call_details: get: tags: @@ -533,6 +2620,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmMarginCallDetailsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmMarginCallDetailsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmMarginCallDetailsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmMarginCallDetailsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/futures/positions: get: tags: @@ -559,6 +2677,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPositionsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPositionsBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPositionsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPositionsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/futures/risk_limits: get: tags: @@ -580,6 +2736,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmRiskLimitsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmRiskLimitsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmRiskLimitsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmRiskLimitsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/futures/settings: get: tags: @@ -601,6 +2788,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmSettingsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmSettingsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmSettingsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmSettingsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' post: tags: - Futures @@ -633,6 +2851,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.SetFcmSettingsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SetFcmSettingsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SetFcmSettingsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SetFcmSettingsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/entities/{entity_id}/futures/sweeps: get: @@ -656,6 +2905,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetFuturesSweepsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFuturesSweepsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFuturesSweepsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFuturesSweepsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' post: tags: - Futures @@ -694,6 +2974,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ScheduleFuturesSweepResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ScheduleFuturesSweepBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ScheduleFuturesSweepForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ScheduleFuturesSweepNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body delete: tags: @@ -717,6 +3028,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CancelFuturesSweepResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelFuturesSweepBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelFuturesSweepForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelFuturesSweepNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/invoices: get: tags: @@ -741,7 +3083,6 @@ paths: items: type: string enum: - - INVOICE_STATE_UNSPECIFIED - INVOICE_STATE_IMPORTED - INVOICE_STATE_BILLED - INVOICE_STATE_PARTIALLY_PAID @@ -778,6 +3119,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetInvoicesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInvoicesBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInvoicesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInvoicesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/locates_availability: get: tags: @@ -810,6 +3182,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetLocateAvailabilitiesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetLocateAvailabilitiesBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetLocateAvailabilitiesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetLocateAvailabilitiesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/margin: get: tags: @@ -832,6 +3235,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginInformationResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginInformationBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginInformationForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginInformationNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/margin_summaries: get: tags: @@ -864,6 +3305,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginSummariesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginSummariesBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginSummariesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginSummariesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/market_data: get: tags: @@ -906,6 +3385,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetMarketDataResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarketDataBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarketDataForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarketDataNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/payment-methods: get: tags: @@ -926,6 +3436,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/payment-methods/{payment_method_id}: get: tags: @@ -951,6 +3492,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodDetailsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodDetailsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodDetailsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodDetailsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/positions: get: tags: @@ -983,6 +3555,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityPositionsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityPositionsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityPositionsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityPositionsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/tf_obligations: get: tags: @@ -1004,6 +3607,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ListTFObligationsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTFObligationsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTFObligationsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTFObligationsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/tf_tiered_fees: get: tags: @@ -1031,6 +3665,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetTFTieredPricingFeesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTFTieredPricingFeesBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTFTieredPricingFeesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTFTieredPricingFeesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/entities/{entity_id}/users: get: tags: @@ -1072,6 +3737,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityUsersResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityUsersBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityUsersForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityUsersNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/financing/eligible-assets: get: tags: @@ -1101,6 +3797,38 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfoliosResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfoliosForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfoliosNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}: get: tags: @@ -1122,16 +3850,47 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioResponse' - /v1/portfolios/{portfolio_id}/accept_quote: - post: - tags: - - Orders - summary: Accept Quote - description: |- - Accepts the quote received by the quote request and creates an order with the provided quote ID. - - Always required: portfolio_id, product_id, side, quote_id, client_quote_id. - operationId: PrimeRESTAPI_AcceptQuote + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + /v1/portfolios/{portfolio_id}/accept_quote: + post: + tags: + - Orders + summary: Accept Quote + description: |- + Accepts the quote received by the quote request and creates an order with the provided quote ID. + + Always required: portfolio_id, product_id, side, quote_id, client_quote_id. + operationId: PrimeRESTAPI_AcceptQuote parameters: - name: portfolio_id in: path @@ -1166,7 +3925,6 @@ paths: description: A quote id that was returned from the quote request example: f69a20b1-4ac4-420e-90b5-814a12565bfa settl_currency: - title: "next: 7" type: string required: true responses: @@ -1176,6 +3934,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.AcceptQuoteResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.AcceptQuoteBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.AcceptQuoteForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.AcceptQuoteNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/accruals: get: @@ -1209,6 +3998,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioInterestAccrualsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioInterestAccrualsBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioInterestAccrualsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioInterestAccrualsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/activities: get: tags: @@ -1243,7 +4070,6 @@ paths: items: type: string enum: - - OTHER_ACTIVITY_CATEGORY - ACTIVITY_CATEGORY_ORDER - ACTIVITY_CATEGORY_TRANSACTION - ACTIVITY_CATEGORY_ACCOUNT @@ -1259,7 +4085,6 @@ paths: items: type: string enum: - - OTHER_ACTIVITY_STATUS - ACTIVITY_STATUS_CANCELLED - ACTIVITY_STATUS_PROCESSING - ACTIVITY_STATUS_COMPLETED @@ -1309,6 +4134,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivitiesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivitiesBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivitiesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivitiesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/activities/{activity_id}: get: tags: @@ -1336,6 +4199,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivityResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivityBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivityForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivityNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/address_book: get: tags: @@ -1389,6 +4290,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAddressBookResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAddressBookBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAddressBookForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAddressBookNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' post: tags: - Address Book @@ -1438,6 +4370,43 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CreatePortfolioAddressBookEntryResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreatePortfolioAddressBookEntryBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreatePortfolioAddressBookEntryForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreatePortfolioAddressBookEntryNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/advanced_transfers: get: @@ -1520,6 +4489,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransfersResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransfersBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransfersForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransfersNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' post: tags: - Advanced Transfer @@ -1555,6 +4562,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CreateAdvancedTransferResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAdvancedTransferBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAdvancedTransferForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAdvancedTransferNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/advanced_transfers/{advanced_transfer_id}/cancel: post: @@ -1593,6 +4638,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CancelAdvancedTransferResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelAdvancedTransferBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelAdvancedTransferForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelAdvancedTransferNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/advanced_transfers/{advanced_transfer_id}/transactions: get: @@ -1623,6 +4706,38 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransferTransactionsResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransferTransactionsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransferTransactionsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/allocations: get: tags: @@ -1699,6 +4814,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAllocationsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAllocationsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAllocationsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAllocationsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/allocations/net/{netting_id}: get: tags: @@ -1726,6 +4872,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationsByClientNettingIdResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationsByClientNettingIdBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationsByClientNettingIdForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationsByClientNettingIdNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/allocations/{allocation_id}: get: tags: @@ -1753,6 +4930,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/balances: get: tags: @@ -1798,6 +5006,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBalancesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBalancesBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBalancesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBalancesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/buying_power: get: tags: @@ -1835,14 +5074,50 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetBuyingPowerResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetBuyingPowerBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetBuyingPowerForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetBuyingPowerNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/candles: get: tags: - Products - summary: Get Public Product Candles (Beta) - description: "Get rates for a single product by product ID, grouped in buckets.\ - \ This feature is in beta please reach out to your Coinbase Prime account\ - \ manager for more information." + summary: Get Public Product Candles + description: "Get rates for a single product by product ID, grouped in buckets." operationId: PrimeRESTAPI_GetCandles parameters: - name: portfolio_id @@ -1894,6 +5169,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetCandlesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCandlesBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCandlesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCandlesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/commission: get: tags: @@ -1919,6 +5225,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCommissionResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCommissionBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCommissionForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCommissionNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/counterparty: get: tags: @@ -1940,6 +5277,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCounterpartyIDResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCounterpartyIDBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCounterpartyIDForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCounterpartyIDNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/credit: get: tags: @@ -1961,6 +5329,149 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPostTradeCreditResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPostTradeCreditBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPostTradeCreditForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPostTradeCreditNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + /v1/portfolios/{portfolio_id}/derivatives/currency_summary: + get: + tags: + - Futures + summary: Get Portfolio Derivatives Currency Summary + description: "Retrieve per-currency international derivatives balances for a\ + \ given portfolio. US Futures balances roll up to a single clearing account\ + \ per entity rather than per portfolio, and are available from the entity\ + \ futures balance summary and risk limits endpoints instead." + operationId: PrimeRESTAPI_GetDerivativesCurrencySummary + parameters: + - name: portfolio_id + in: path + description: Portfolio ID + required: true + schema: + type: string + responses: + "200": + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativesCurrencySummaryResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativesCurrencySummaryBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativesCurrencySummaryForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativesCurrencySummaryNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + /v1/portfolios/{portfolio_id}/derivatives/positions: + get: + tags: + - Futures + summary: List Portfolio Derivative Positions + description: Retrieve all active derivative positions for a given portfolio. + operationId: PrimeRESTAPI_GetDerivativePositions + parameters: + - name: portfolio_id + in: path + description: Portfolio ID + required: true + schema: + type: string + - name: product_id + in: query + description: Product ID. Optional + schema: + type: string + responses: + "200": + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativePositionsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativePositionsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativePositionsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativePositionsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/fills: get: tags: @@ -2017,6 +5528,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioFillsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioFillsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioFillsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioFillsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/locates: get: tags: @@ -2057,6 +5599,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetExistingLocatesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetExistingLocatesBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetExistingLocatesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetExistingLocatesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' post: tags: - Financing @@ -2103,6 +5676,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CreateNewLocatesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNewLocatesBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNewLocatesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNewLocatesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/margin_conversions: get: @@ -2137,6 +5741,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginConversionsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginConversionsBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginConversionsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginConversionsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/onchain_address_group: put: tags: @@ -2170,6 +5812,43 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ActivityCreationResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateOnchainAddressGroupBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateOnchainAddressGroupForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateOnchainAddressGroupNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body post: tags: @@ -2203,6 +5882,43 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ActivityCreationResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainAddressGroupBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainAddressGroupForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainAddressGroupNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/onchain_address_group/{address_group_id}: delete: @@ -2229,18 +5945,55 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ActivityCreationResponse' - /v1/portfolios/{portfolio_id}/onchain_address_groups: - get: - tags: - - Onchain Address Book - summary: List Onchain Address Groups - description: Lists all onchain address groups for a given portfolio ID - operationId: PrimeRESTAPI_ListOnchainAddressGroups - parameters: - - name: portfolio_id - in: path - description: Portfolio ID - required: true + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.DeleteOnchainAddressGroupBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.DeleteOnchainAddressGroupForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.DeleteOnchainAddressGroupNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + /v1/portfolios/{portfolio_id}/onchain_address_groups: + get: + tags: + - Onchain Address Book + summary: List Onchain Address Groups + description: Lists all onchain address groups for a given portfolio ID + operationId: PrimeRESTAPI_ListOnchainAddressGroups + parameters: + - name: portfolio_id + in: path + description: Portfolio ID + required: true schema: type: string responses: @@ -2250,6 +6003,43 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ListOnchainAddressGroupsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListOnchainAddressGroupsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListOnchainAddressGroupsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListOnchainAddressGroupsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/open_orders: get: tags: @@ -2356,6 +6146,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetOpenOrdersResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOpenOrdersBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOpenOrdersForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOpenOrdersNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/order: post: tags: @@ -2460,7 +6281,12 @@ paths: \ would be placed on venues, opposite to limit_price (PEG orders\ \ only)" type: string - description: "next: 23" + is_buy_exact: + type: boolean + description: "Buy Exact order flag. When true, fees for a BUY order\ + \ sized in quote_value are charged on top of the requested quote_value\ + \ instead of being carved out of it. Only valid for BUY orders\ + \ sized in quote_value on SPOT products." required: true responses: "200": @@ -2469,6 +6295,43 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CreateOrderResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOrderBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOrderForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOrderNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/order_preview: post: @@ -2566,7 +6429,12 @@ paths: \ would be placed on venues, opposite to limit_price (PEG orders\ \ only)" type: string - description: "next: 21" + is_buy_exact: + type: boolean + description: "Buy Exact order flag. When true, fees for a BUY order\ + \ sized in quote_value are charged on top of the requested quote_value\ + \ instead of being carved out of it. Only valid for BUY orders\ + \ sized in quote_value on SPOT products." required: true responses: "200": @@ -2575,6 +6443,43 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.PostOrderPreviewResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.OrderPreviewBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.OrderPreviewForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.OrderPreviewNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/orders: get: @@ -2706,6 +6611,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetOrdersResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrdersBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrdersForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrdersNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/orders/{order_id}: get: tags: @@ -2733,6 +6669,38 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderResponse' + "400": + description: "Bad request. portfolio_id or order_id is missing, invalid,\ + \ or the order was not found." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderForbiddenErrorResponse' + "404": + description: The requested portfolio or resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/orders/{order_id}/cancel: post: tags: @@ -2760,13 +6728,43 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CancelOrderResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelOrderBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelOrderForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelOrderNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/orders/{order_id}/edit: put: tags: - Orders - summary: Edit Order (Beta) - description: Edit an open order. This feature is in beta please reach out to - your Coinbase Prime account manager for more information. + summary: Edit Order + description: Edit an open order. operationId: PrimeRESTAPI_EditOrder parameters: - name: portfolio_id @@ -2834,6 +6832,18 @@ paths: description: 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 + offset: + type: string + description: New peg offset value for PEG orders. 0 means peg to + BBO. Only non-negative values are allowed. The order's peg_offset_type + is immutable and is reused server-side to interpret this value + (PEG orders only) + wig_level: + type: string + description: "New WIG (Would if Good) level for PEG orders - the\ + \ best price a pegged order would be placed on venues, opposite\ + \ to limit_price. Cannot be added or removed post-placement (PEG\ + \ orders only)" required: true responses: "200": @@ -2842,6 +6852,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.EditOrderResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.EditOrderBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.EditOrderForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.EditOrderNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/orders/{order_id}/edit_history: get: @@ -2870,6 +6911,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderEditHistoryResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderEditHistoryBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderEditHistoryForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderEditHistoryNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/orders/{order_id}/fills: get: tags: @@ -2919,12 +6991,43 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderFillsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderFillsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderFillsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderFillsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/products: get: tags: - Products summary: List Portfolio Products - description: List tradable products for a given portfolio. + description: List products for a given portfolio. operationId: PrimeRESTAPI_GetPortfolioProducts parameters: - name: portfolio_id @@ -2940,7 +7043,8 @@ paths: type: string - name: limit in: query - description: Number of items to retrieve + description: Number of items to retrieve. Must be between 0 (defaulted to + 10) and 1000. schema: type: integer format: int32 @@ -2961,11 +7065,13 @@ paths: - UNKNOWN_PRODUCT_TYPE: Unknown product type - SPOT: Spot product - FUTURE: Future product + - OPTION: Option product schema: type: string enum: - SPOT - FUTURE + - OPTION - name: contract_expiry_type in: query description: |- @@ -2976,9 +7082,7 @@ paths: - CONTRACT_EXPIRY_TYPE_PERPETUAL: Perpetual futures contract (no expiry) schema: type: string - default: CONTRACT_EXPIRY_TYPE_UNSPECIFIED enum: - - CONTRACT_EXPIRY_TYPE_UNSPECIFIED - CONTRACT_EXPIRY_TYPE_EXPIRING - CONTRACT_EXPIRY_TYPE_PERPETUAL - name: expiring_contract_status @@ -3003,6 +7107,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioProductsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioProductsBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioProductsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioProductsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/rfq: post: tags: @@ -3078,6 +7213,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.QuoteResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateQuoteRequestBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateQuoteRequestForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateQuoteRequestNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/staking/initiate: post: @@ -3086,7 +7252,8 @@ paths: summary: Request to stake currency in a portfolio description: "Creates an execution request to stake funds across a portfolio.\ \ This will stake funds in one or more wallets in the portfolio, with a total\ - \ bondable balance up to the requested stake amount." + \ bondable balance up to the requested stake amount. This feature is gated.\ + \ Please contact your account manager or primeops@coinbase.com to enable." operationId: PrimeRESTAPI_PortfolioStakingInitiate parameters: - name: portfolio_id @@ -3126,6 +7293,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingInitiateResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingInitiateBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingInitiateForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingInitiateNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/staking/transaction-validators/query: post: @@ -3176,22 +7374,61 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ListTransactionValidatorsResponse' - x-codegen-request-body-name: body - /v1/portfolios/{portfolio_id}/staking/unstake: - post: - tags: - - Staking - summary: Request to unstake currency across a portfolio - description: "Creates an execution request to unstake funds across a portfolio.\ - \ This will unstake funds in one or more wallets in the portfolio, with a\ - \ total bonded balance up to the requested unstake amount." - operationId: PrimeRESTAPI_PortfolioStakingUnstake - parameters: - - name: portfolio_id - in: path - description: The portfolio ID - required: true - schema: + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTransactionValidatorsBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTransactionValidatorsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTransactionValidatorsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + x-codegen-request-body-name: body + /v1/portfolios/{portfolio_id}/staking/unstake: + post: + tags: + - Staking + summary: Request to unstake currency across a portfolio + description: "Creates an execution request to unstake funds across a portfolio.\ + \ This will unstake funds in one or more wallets in the portfolio, with a\ + \ total bonded balance up to the requested unstake amount. This feature is\ + \ gated. Please contact your account manager or primeops@coinbase.com to enable." + operationId: PrimeRESTAPI_PortfolioStakingUnstake + parameters: + - name: portfolio_id + in: path + description: The portfolio ID + required: true + schema: type: string requestBody: content: @@ -3225,6 +7462,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingUnstakeResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingUnstakeBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingUnstakeForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingUnstakeNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/transactions: get: @@ -3287,6 +7555,7 @@ paths: - ONCHAIN_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet - PORTFOLIO_STAKE: Portfolio-level staking operation - PORTFOLIO_UNSTAKE: Portfolio-level unstaking operation + - MERGE_STAKE: On-chain transaction consolidating funds from different addresses belonging to the same wallet. style: form explode: true schema: @@ -3329,6 +7598,7 @@ paths: - ONCHAIN_TRANSACTION - PORTFOLIO_STAKE - PORTFOLIO_UNSTAKE + - MERGE_STAKE - name: start_time in: query description: "UTC timestamp from which to filter the response (inclusive,\ @@ -3380,7 +7650,6 @@ paths: items: type: string enum: - - TRAVEL_RULE_STATUS_UNSPECIFIED - TRAVEL_RULE_STATUS_PENDING - TRAVEL_RULE_STATUS_SUBMITTED responses: @@ -3390,6 +7659,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioTransactionsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioTransactionsBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioTransactionsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioTransactionsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/transactions/{transaction_id}: get: tags: @@ -3417,6 +7724,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/transactions/{transaction_id}/travel_rule: get: tags: @@ -3444,6 +7789,43 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionTravelRuleDataResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionTravelRuleDataBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionTravelRuleDataForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionTravelRuleDataNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/transactions/{transaction_id}/travel_rule/deposit: post: tags: @@ -3491,6 +7873,43 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.SubmitDepositTravelRuleDataResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SubmitDepositTravelRuleDataBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SubmitDepositTravelRuleDataForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SubmitDepositTravelRuleDataNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/users: get: @@ -3533,6 +7952,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioUsersResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioUsersBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioUsersForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioUsersNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/wallets: get: tags: @@ -3608,6 +8058,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletsBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' post: tags: - Wallets @@ -3655,6 +8143,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/wallets/{wallet_id}: get: @@ -3683,6 +8202,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/addresses: get: tags: @@ -3727,6 +8284,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ListWalletAddressesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWalletAddressesBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWalletAddressesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWalletAddressesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' post: tags: - Wallets @@ -3769,6 +8364,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.BlockchainAddress' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletDepositAddressBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletDepositAddressForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletDepositAddressNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/balance: get: @@ -3797,6 +8430,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBalanceResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBalanceBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBalanceForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBalanceNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/conversion: post: tags: @@ -3857,6 +8528,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CreateConversionResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateConversionBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateConversionForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateConversionNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/deposit_instructions: get: @@ -3921,7 +8623,45 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletDepositInstructionsResponse' - /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/onchain_transaction: + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletDepositInstructionsBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletDepositInstructionsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletDepositInstructionsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/onchain_transaction: post: tags: - Transactions @@ -3968,14 +8708,45 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainTransactionResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainTransactionBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainTransactionForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainTransactionNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/claim_rewards: post: tags: - Staking summary: Claim Wallet Staking Rewards (Alpha) - description: Request to claim staking rewards. This feature is in alpha. Please - reach out to your Coinbase Prime account manager for more information + description: Request to claim staking rewards. This feature is only for ETH + Pectra (0x02) validators. operationId: PrimeRESTAPI_StakingClaimRewards parameters: - name: portfolio_id @@ -4016,6 +8787,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.StakingClaimRewardsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingClaimRewardsBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingClaimRewardsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingClaimRewardsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/initiate: post: @@ -4063,6 +8872,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.StakingInitiateResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingInitiateBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingInitiateForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingInitiateNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/status: get: @@ -4092,6 +8939,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetStakingStatusResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetStakingStatusBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetStakingStatusForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetStakingStatusNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/unstake: post: tags: @@ -4139,6 +9017,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.StakingUnstakeResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingUnstakeBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingUnstakeForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingUnstakeNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/unstake/preview: post: @@ -4183,6 +9099,31 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.PreviewUnstakeResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PreviewUnstakeBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PreviewUnstakeForbiddenErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/unstake/status: get: @@ -4212,6 +9153,37 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetUnstakingStatusResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetUnstakingStatusBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetUnstakingStatusForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetUnstakingStatusNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transactions: get: tags: @@ -4274,6 +9246,7 @@ paths: - ONCHAIN_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet - PORTFOLIO_STAKE: Portfolio-level staking operation - PORTFOLIO_UNSTAKE: Portfolio-level unstaking operation + - MERGE_STAKE: On-chain transaction consolidating funds from different addresses belonging to the same wallet. style: form explode: true schema: @@ -4316,6 +9289,7 @@ paths: - ONCHAIN_TRANSACTION - PORTFOLIO_STAKE - PORTFOLIO_UNSTAKE + - MERGE_STAKE - name: start_time in: query description: "UTC timestamp from which to filter the response (inclusive,\ @@ -4357,6 +9331,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletTransactionsResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletTransactionsBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletTransactionsForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletTransactionsNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers: post: tags: @@ -4409,6 +9421,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletTransferResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletTransferBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletTransferForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletTransferNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/web3_balances: get: @@ -4468,6 +9518,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.ListWeb3WalletBalancesResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWeb3WalletBalancesBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWeb3WalletBalancesForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWeb3WalletBalancesNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals: post: tags: @@ -4526,6 +9614,50 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletWithdrawalResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletWithdrawalBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletWithdrawalForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletWithdrawalNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "500": + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' x-codegen-request-body-name: body /v1/portfolios/{portfolio_id}/withdrawal_power: get: @@ -4555,6 +9687,44 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetWithdrawalPowerResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWithdrawalPowerBadRequestErrorResponse' + "401": + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWithdrawalPowerForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWithdrawalPowerNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' /v2/entities/{entity_id}/cross_margin/prime: get: tags: @@ -4576,17 +9746,156 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginPrimeOverviewResponse' -components: - schemas: - coinbase.brokerage.proxy.events.materialized.api.LimitOrderEdit: - title: LimitOrderEdit represents an order edit that is accepted - type: object - properties: - price: - title: New price for the edited order + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginPrimeOverviewBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginPrimeOverviewForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginPrimeOverviewNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + /v1/entities/{entity_id}/rewards/rate: + get: + tags: + - Financing + summary: Get Entity Rewards Rate (Beta) + description: Returns the current rewards rate and available rate tiers for the + entity. + operationId: PrimeBeta_GetEntityRewardsRate + parameters: + - name: entity_id + in: path + description: The ID of the Prime entity whose rewards rate information is + requested. + required: true + schema: type: string - size: - title: New size for the edited order + responses: + "200": + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.beta.GetRewardsRateResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityRewardsRateBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityRewardsRateForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityRewardsRateNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + /v1/portfolios/{portfolio_id}/rewards/rate: + get: + tags: + - Financing + summary: Get Portfolio Rewards Rate (Beta) + description: Returns the current rewards rate and available rate tiers for the + portfolio. + operationId: PrimeBeta_GetPortfolioRewardsRate + parameters: + - name: portfolio_id + in: path + description: The ID of the Prime portfolio whose rewards rate information + is requested. + required: true + schema: + type: string + responses: + "200": + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.beta.GetRewardsRateResponse' + "400": + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioRewardsRateBadRequestErrorResponse' + "403": + description: Permission denied. The API key lacks the required scope for + this resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioRewardsRateForbiddenErrorResponse' + "404": + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioRewardsRateNotFoundErrorResponse' + "429": + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + "503": + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' +components: + schemas: + coinbase.brokerage.proxy.events.materialized.api.LimitOrderEdit: + title: LimitOrderEdit represents an order edit that is accepted + type: object + properties: + price: + title: New price for the edited order + type: string + size: + title: New size for the edited order type: string display_size: title: New display size for the edited order @@ -4691,9 +10000,7 @@ components: description: counterparty id coinbase.custody.api.AddressBookType: type: string - default: ADDRESS_BOOK_TYPE_UNSPECIFIED enum: - - ADDRESS_BOOK_TYPE_UNSPECIFIED - ADDRESS_BOOK_TYPE_ADDRESS - ADDRESS_BOOK_TYPE_COUNTERPARTY_ID coinbase.custody.api.DisplayUser: @@ -5135,9 +10442,7 @@ components: - PERCENT coinbase.public_rest_api.AllocationStatus: type: string - default: ALLOCATION_STATUS_UNSPECIFIED enum: - - ALLOCATION_STATUS_UNSPECIFIED - ALLOCATION_STATUS_ALLOCATION_PENDING - ALLOCATION_STATUS_ALLOCATION_ACCEPTED - ALLOCATION_STATUS_ALLOCATION_ALLOCATED @@ -5305,9 +10610,7 @@ components: example: "0.241437903" coinbase.public_rest_api.Benchmark: type: string - default: BENCHMARK_UNSET enum: - - BENCHMARK_UNSET - ZERO - SOFR_360 - SOFR_365 @@ -5319,7 +10622,10 @@ components: type: string settlement_date: type: string - description: The intended time of Transfer settlement in YYYYMMDD format + description: "The intended time of Transfer settlement in YYYYMMDD format.\ + \ The Settlement Date represents the date contractually agreed upon by\ + \ the transacting parties; actual settlement will occur upon completion\ + \ of the transfer, which may differ from such agreed date." trade_date: type: string description: Optional date of the original Trade in YYYYMMMDD format @@ -5440,6 +10746,18 @@ components: - THIRTY_MINUTES - TWO_HOURS - FOUR_HOURS + coinbase.public_rest_api.ComboLeg: + type: object + properties: + product_id: + type: string + description: "The product identifier for the options instrument (e.g., \"\ + BTC-28MAR25-50000-C\")." + quantity: + type: string + side: + $ref: '#/components/schemas/coinbase.public_rest_api.OrderSide' + description: ComboLeg describes a single leg within an options combo order. coinbase.public_rest_api.Commission: type: object properties: @@ -5491,9 +10809,7 @@ components: - CONTRACT_EXPIRY_TYPE_UNSPECIFIED: Unspecified contract expiry type - CONTRACT_EXPIRY_TYPE_EXPIRING: Expiring futures contract - CONTRACT_EXPIRY_TYPE_PERPETUAL: Perpetual futures contract (no expiry) - default: CONTRACT_EXPIRY_TYPE_UNSPECIFIED enum: - - CONTRACT_EXPIRY_TYPE_UNSPECIFIED - CONTRACT_EXPIRY_TYPE_EXPIRING - CONTRACT_EXPIRY_TYPE_PERPETUAL coinbase.public_rest_api.Conversion: @@ -5544,6 +10860,50 @@ components: type: string description: Conversion rate example: "0.1" + coinbase.public_rest_api.ConversionFee: + type: object + properties: + from_currency: + type: string + description: Source currency ticker. + example: USDC + to_currency: + type: string + description: Destination currency ticker. + example: USD + net_conversion_volume_mtd: + type: string + description: "Month-to-date net conversion volume denominated in from_currency,\ + \ aggregated at the owning organization level. Positive = net from->to,\ + \ negative = net to->from." + example: "12345678.90" + fee_tiers: + type: array + description: |- + Progressive fee tiers applicable to this organization for this pair. + Tiers are ordered from lowest to highest threshold. + items: + $ref: '#/components/schemas/coinbase.public_rest_api.ConversionFeeTier' + description: |- + Per-pair conversion fee row: month-to-date net conversion volume and + the applicable progressive fee tiers for an organization. + coinbase.public_rest_api.ConversionFeeTier: + type: object + properties: + min_threshold: + type: string + description: Inclusive lower bound for the tier in USD. + example: "10000000" + max_threshold: + type: string + description: "Exclusive upper bound for the tier in USD. Empty string for\ + \ the highest, unbounded tier." + example: "150000000" + rate_bps: + type: string + description: Tier rate in basis points. + example: "5.0" + description: A single fee tier in the progressive stablecoin conversion schedule. coinbase.public_rest_api.Counterparty: type: object properties: @@ -5723,6 +11083,12 @@ components: type: string description: Unique identifier for the created transaction example: 0bf7bf1e-bafa-4d7e-9312-fa0bf3b63f27 + coinbase.public_rest_api.CreateOptionComboResponse: + type: object + properties: + combo_id: + title: combo id returned by deribit + type: string coinbase.public_rest_api.CreateOrderResponse: type: object properties: @@ -6136,6 +11502,13 @@ components: description: Basis offset credit rate. example: "0.92" description: XM 2.0 risk parameters for an asset tier. + coinbase.public_rest_api.CustomStablecoinAsset: + title: Currency metadata of the custom stablecoin asset for the reward program + type: object + properties: + symbol: + type: string + description: "The asset symbol (e.g. USDC, USDF)" coinbase.public_rest_api.CustomStablecoinRewardDetails: title: Details for a custom stablecoin reward payout transaction type: object @@ -6146,6 +11519,8 @@ components: end_date: type: string description: ISO-formatted end date of the reward period (e.g. 2025-02-28T00:00:00Z) + asset: + $ref: '#/components/schemas/coinbase.public_rest_api.CustomStablecoinAsset' coinbase.public_rest_api.DefiBalance: type: object properties: @@ -6159,6 +11534,126 @@ components: net_usd_value: title: Total USD value type: string + coinbase.public_rest_api.DerivativePosition: + type: object + properties: + product_id: + type: string + description: Product ID + example: BTC-31JAN24-CDE + side: + $ref: '#/components/schemas/coinbase.public_rest_api.FcmPositionSide' + number_of_contracts: + type: string + description: Number of contracts + example: "10" + daily_realized_pnl: + type: string + description: Daily realized PNL + example: "10.12" + unrealized_pnl: + type: string + description: Unrealized PNL + example: "10.12" + current_price: + type: string + description: Current price of position + example: "10.12" + avg_entry_price: + type: string + description: Average entry price + example: "10.12" + expiration_time: + type: string + description: Expiration time of position + format: date-time + example: 2021-01-01T00:00:00Z + product_type: + $ref: '#/components/schemas/coinbase.public_rest_api.DerivativeProductType' + currency: + type: string + description: Settlement currency + example: USD + options_details: + $ref: '#/components/schemas/coinbase.public_rest_api.OptionsDetails' + venue_id: + type: string + description: Venue ID of the position + example: CDE + description: A single derivative position across all derivative product types. + coinbase.public_rest_api.DerivativeProductType: + type: string + description: |- + The general type of a derivative product. + + - DERIVATIVE_PRODUCT_TYPE_UNSPECIFIED: Unknown product type. + - DERIVATIVE_PRODUCT_TYPE_SPOT: Spot product. + - DERIVATIVE_PRODUCT_TYPE_FUTURE: Future product. + - DERIVATIVE_PRODUCT_TYPE_EQUITY: Equity product. + - DERIVATIVE_PRODUCT_TYPE_PREDICTION_MARKET: Prediction market product. + - DERIVATIVE_PRODUCT_TYPE_OPTION: Option product. + - DERIVATIVE_PRODUCT_TYPE_BASIS: Basis product. + - DERIVATIVE_PRODUCT_TYPE_EQUITY_OPTION: Equity option product. + - DERIVATIVE_PRODUCT_TYPE_FUTURE_COMBO: Future combo product. + - DERIVATIVE_PRODUCT_TYPE_OPTION_COMBO: Option combo product. + enum: + - DERIVATIVE_PRODUCT_TYPE_SPOT + - DERIVATIVE_PRODUCT_TYPE_FUTURE + - DERIVATIVE_PRODUCT_TYPE_EQUITY + - DERIVATIVE_PRODUCT_TYPE_PREDICTION_MARKET + - DERIVATIVE_PRODUCT_TYPE_OPTION + - DERIVATIVE_PRODUCT_TYPE_BASIS + - DERIVATIVE_PRODUCT_TYPE_EQUITY_OPTION + - DERIVATIVE_PRODUCT_TYPE_FUTURE_COMBO + - DERIVATIVE_PRODUCT_TYPE_OPTION_COMBO + coinbase.public_rest_api.DerivativesCurrencyBalance: + type: object + properties: + currency: + type: string + description: Settlement currency + example: BTC + balance: + type: string + description: Cash balance for the currency + example: "1000.00" + unrealized_pnl: + type: string + description: Unrealized PNL + example: "10.12" + realized_pnl: + type: string + description: Realized PNL + example: "10.12" + initial_margin: + type: string + description: Initial margin + example: "10.12" + maintenance_margin: + type: string + description: Maintenance margin + example: "10.12" + margin_balance: + type: string + description: Margin balance for the currency + example: "10.12" + option_value: + type: string + description: Option value for the currency + example: "10.12" + margin_excess: + type: string + description: Margin excess for the currency (negative indicates a margin + deficit) + example: "10.12" + margin_utilization: + type: string + description: "Margin utilization for the currency, as a percentage" + example: "42.50" + margin_health_state: + $ref: '#/components/schemas/coinbase.public_rest_api.FcmMarginHealthState' + description: Balances for a single settlement currency within an international + derivatives portfolio. coinbase.public_rest_api.DestinationAlloc: type: object properties: @@ -6281,9 +11776,7 @@ components: $ref: '#/components/schemas/coinbase.public_rest_api.SecondaryPermission' coinbase.public_rest_api.EstimateType: type: string - default: UNSPECIFIED enum: - - UNSPECIFIED - LIVE - INTERIM coinbase.public_rest_api.EstimatedNetworkFees: @@ -6415,27 +11908,21 @@ components: example: "1000.00" coinbase.public_rest_api.FcmFuturesSweepStatus: type: string - default: FCM_FUTURES_SWEEP_STATUS_UNSPECIFIED enum: - - FCM_FUTURES_SWEEP_STATUS_UNSPECIFIED - FCM_FUTURES_SWEEP_STATUS_PENDING - FCM_FUTURES_SWEEP_STATUS_CLOSED - FCM_FUTURES_SWEEP_STATUS_CANCELED - FCM_FUTURES_SWEEP_STATUS_PROCESSING coinbase.public_rest_api.FcmMarginCallState: type: string - default: FCM_MARGIN_CALL_STATE_UNSPECIFIED enum: - - FCM_MARGIN_CALL_STATE_UNSPECIFIED - FCM_MARGIN_CALL_STATE_CLOSED - FCM_MARGIN_CALL_STATE_ROLLED_OVER - FCM_MARGIN_CALL_STATE_DEFAULT - FCM_MARGIN_CALL_STATE_OFFICIAL coinbase.public_rest_api.FcmMarginCallType: type: string - default: FCM_MARGIN_CALL_TYPE_UNSPECIFIED enum: - - FCM_MARGIN_CALL_TYPE_UNSPECIFIED - FCM_MARGIN_CALL_TYPE_URGENT - FCM_MARGIN_CALL_TYPE_REGULAR coinbase.public_rest_api.FcmMarginHealthState: @@ -6448,9 +11935,7 @@ components: - 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. - default: FCM_MARGIN_HEALTH_STATE_UNSPECIFIED enum: - - FCM_MARGIN_HEALTH_STATE_UNSPECIFIED - FCM_MARGIN_HEALTH_STATE_HEALTHY - FCM_MARGIN_HEALTH_STATE_RESTRICTED - FCM_MARGIN_HEALTH_STATE_PRE_LIQUIDATION @@ -6491,9 +11976,7 @@ components: example: 2021-01-01T00:00:00Z coinbase.public_rest_api.FcmPositionSide: type: string - default: FCM_POSITION_SIDE_UNSPECIFIED enum: - - FCM_POSITION_SIDE_UNSPECIFIED - LONG - SHORT coinbase.public_rest_api.FcmScheduledMaintenance: @@ -6519,9 +12002,7 @@ components: - 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 - default: FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED enum: - - FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED - FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE - FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE - FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE @@ -6573,9 +12054,7 @@ components: - 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 - default: FCM_TRADING_SESSION_STATE_UNDEFINED enum: - - FCM_TRADING_SESSION_STATE_UNDEFINED - FCM_TRADING_SESSION_STATE_PRE_OPEN - FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL - FCM_TRADING_SESSION_STATE_OPEN @@ -6737,6 +12216,15 @@ components: type: array items: $ref: '#/components/schemas/coinbase.public_rest_api.Candle' + coinbase.public_rest_api.GetConversionFeesResponse: + type: object + properties: + fees: + type: array + items: + $ref: '#/components/schemas/coinbase.public_rest_api.ConversionFee' + description: "Response for GetConversionFees: one ConversionFee row per supported\ + \ pair." coinbase.public_rest_api.GetCrossMarginOverviewResponse: type: object properties: @@ -6784,6 +12272,28 @@ components: description: Margin period of risk (number of days). format: double example: 5.0 + coinbase.public_rest_api.GetDerivativePositionsResponse: + type: object + properties: + positions: + type: array + items: + $ref: '#/components/schemas/coinbase.public_rest_api.DerivativePosition' + description: Response containing the portfolio's active derivative positions. + coinbase.public_rest_api.GetDerivativesCurrencySummaryResponse: + type: object + properties: + portfolio_id: + type: string + description: Portfolio ID + example: 00000000-0000-0000-0000-000000000000 + balances: + type: array + items: + $ref: '#/components/schemas/coinbase.public_rest_api.DerivativesCurrencyBalance' + description: |- + Response containing the portfolio's international derivatives balances, broken out + per settlement currency. coinbase.public_rest_api.GetEntityActivitiesResponse: required: - activities @@ -7358,13 +12868,17 @@ components: properties: withdrawal_power: $ref: '#/components/schemas/coinbase.public_rest_api.WithdrawalPower' + coinbase.public_rest_api.GetXMLiquidationResponse: + title: GetXMLiquidationResponse contains detailed information about an XM liquidation + type: object + properties: + liquidation: + $ref: '#/components/schemas/coinbase.public_rest_api.XMLiquidationDetail' coinbase.public_rest_api.HierarchyType: title: "HierarchyType are the enums for various hierarchies within Prime, ex\ \ Entity, Organization, Portfolio" type: string - default: HIERARCHY_TYPE_UNSPECIFIED enum: - - HIERARCHY_TYPE_UNSPECIFIED - HIERARCHY_TYPE_PORTFOLIO - HIERARCHY_TYPE_ENTITY coinbase.public_rest_api.Invoice: @@ -7423,9 +12937,7 @@ components: coinbase.public_rest_api.InvoiceState: title: States type: string - default: INVOICE_STATE_UNSPECIFIED enum: - - INVOICE_STATE_UNSPECIFIED - INVOICE_STATE_IMPORTED - INVOICE_STATE_BILLED - INVOICE_STATE_PARTIALLY_PAID @@ -7433,9 +12945,7 @@ components: coinbase.public_rest_api.InvoiceType: title: Types type: string - default: INVOICE_TYPE_UNSPECIFIED enum: - - INVOICE_TYPE_UNSPECIFIED - INVOICE_TYPE_AUC_FEE - INVOICE_TYPE_MINIMUM_FEE - INVOICE_TYPE_WITHDRAWAL_FEE @@ -7573,6 +13083,18 @@ components: support. items: $ref: '#/components/schemas/coinbase.public_rest_api.DefiBalance' + coinbase.public_rest_api.ListXMLiquidationsResponse: + title: ListXMLiquidationsResponse contains a paginated list of XM liquidation + summaries + type: object + properties: + liquidations: + type: array + description: List of XM liquidation summaries + items: + $ref: '#/components/schemas/coinbase.public_rest_api.XMLiquidationSummary' + pagination: + $ref: '#/components/schemas/coinbase.public_rest_api.PaginatedResponse' coinbase.public_rest_api.LoanInfo: type: object properties: @@ -7598,9 +13120,7 @@ components: example: "1000" coinbase.public_rest_api.LoanType: type: string - default: LOAN_TYPE_UNSET enum: - - LOAN_TYPE_UNSET - BILATERAL_LENDING - TRADE_FINANCE - PORTFOLIO_MARGIN @@ -7632,9 +13152,7 @@ components: $ref: '#/components/schemas/coinbase.public_rest_api.MarginAddOnType' coinbase.public_rest_api.MarginAddOnType: type: string - default: MARGIN_ADD_ON_TYPE_UNSPECIFIED enum: - - MARGIN_ADD_ON_TYPE_UNSPECIFIED - SINGLE_COIN_STRESS - CONCENTRATION_STRESS - MACRO_STRESS @@ -7976,16 +13494,12 @@ components: example: "0.001" coinbase.public_rest_api.NetworkFamily: type: string - default: NETWORK_FAMILY_UNSPECIFIED enum: - - NETWORK_FAMILY_UNSPECIFIED - NETWORK_FAMILY_EVM - NETWORK_FAMILY_SOLANA coinbase.public_rest_api.NetworkType: type: string - default: NETWORK_TYPE_UNSPECIFIED enum: - - NETWORK_TYPE_UNSPECIFIED - NETWORK_TYPE_EVM - NETWORK_TYPE_SOLANA coinbase.public_rest_api.OnchainTransactionDetails: @@ -8026,6 +13540,105 @@ components: example: insufficient_funds signing_status: $ref: '#/components/schemas/coinbase.public_rest_api.SigningStatus' + coinbase.public_rest_api.OptionProductDetails: + title: OptionProductDetails contains details specific to option products + type: object + properties: + option_type: + $ref: '#/components/schemas/coinbase.public_rest_api.OptionType' + strike: + title: Strike price of the option + type: string + description: Strike price of the option + example: "2400" + contract_root_unit: + title: Contract root unit (underlying asset) + type: string + description: Contract root unit (underlying asset) + example: ETH + settlement_currency: + title: Currency the option settles in + type: string + description: Currency the option settles in + example: ETH + contract_code: + title: Contract code identifier + type: string + description: Contract code identifier + example: eth_usd + group_description: + title: Descriptive name for the product group + type: string + description: Descriptive name for the product group + example: Deribit ETH Inverse Options + contract_size: + title: Contract size + type: string + description: Contract size + example: "1" + contract_expiry: + title: Contract expiry timestamp + type: string + description: Contract expiry timestamp + format: date-time + settlement_period: + $ref: '#/components/schemas/coinbase.public_rest_api.SettlementPeriod' + settlement_model: + $ref: '#/components/schemas/coinbase.public_rest_api.SettlementModel' + counter_currency: + title: Currency the option is quoted against + type: string + description: Currency the option is quoted against + example: ETH + lot_size: + title: Smallest tradable quantity of the contract + type: string + description: Smallest tradable quantity of the contract + example: "10" + price_increment_steps: + type: array + description: Tiered price increments that override price_increment above + a threshold; empty when a single price_increment applies + items: + $ref: '#/components/schemas/coinbase.public_rest_api.PriceIncrementStep' + coinbase.public_rest_api.OptionType: + type: string + description: |- + The type of an option position. + + - OPTION_TYPE_UNSPECIFIED: Unspecified option type. + - OPTION_TYPE_CALL: Call option. + - OPTION_TYPE_PUT: Put option. + enum: + - OPTION_TYPE_CALL + - OPTION_TYPE_PUT + coinbase.public_rest_api.OptionsDetails: + type: object + properties: + delta: + type: string + description: Delta greek + example: "0.5" + gamma: + type: string + description: Gamma greek + example: "0.1" + theta: + type: string + description: Theta greek + example: "-0.05" + vega: + type: string + description: Vega greek + example: "0.2" + strike: + type: string + description: Strike price + example: "50000.00" + option_type: + $ref: '#/components/schemas/coinbase.public_rest_api.OptionType' + description: "Options-specific details for a derivative position, including\ + \ greeks." coinbase.public_rest_api.Order: type: object properties: @@ -8206,6 +13819,11 @@ components: $ref: '#/components/schemas/coinbase.public_rest_api.ProductType' commission_detail_total: $ref: '#/components/schemas/coinbase.public_rest_api.CommissionDetailTotal' + is_buy_exact: + type: boolean + description: Indicates if this was a buy exact order (fees charged on top + of quote size for BUY orders sized in quote) + example: false coinbase.public_rest_api.OrderEdit: type: object properties: @@ -8576,9 +14194,7 @@ components: $ref: '#/components/schemas/coinbase.public_rest_api.PositionReferenceType' coinbase.public_rest_api.PositionReferenceType: type: string - default: POSITION_REFERENCE_TYPE_UNSPECIFIED enum: - - POSITION_REFERENCE_TYPE_UNSPECIFIED - ENTITY - PORTFOLIO coinbase.public_rest_api.PostOrderPreviewResponse: @@ -8681,6 +14297,10 @@ components: description: The maximum order size that will show up on venue order books (in base currency). example: "10.5" + is_buy_exact: + type: boolean + description: Buy Exact order flag + example: false coinbase.public_rest_api.PostTradeCreditInformation: type: object properties: @@ -8753,6 +14373,25 @@ components: $ref: '#/components/schemas/coinbase.public_rest_api.ValidatorUnstakePreview' description: PreviewUnstakeResponse contains the response data from previewing an unstaking operation. + coinbase.public_rest_api.PriceIncrementStep: + type: object + properties: + price_threshold: + title: Prices strictly greater than this threshold use this step's price + increment + type: string + description: Prices strictly greater than this threshold use this step's + price increment; a price equal to it takes the next lower step + example: "0.005" + price_increment: + title: Minimum price increment applied above the threshold + type: string + description: Minimum price increment applied to prices above the threshold + example: "0.0005" + description: |- + PriceIncrementStep overrides the product's price_increment for prices above a + threshold. A price takes the increment of the highest step whose threshold it + strictly exceeds, and the product's price_increment when it exceeds none. coinbase.public_rest_api.PrimeXMHealthStatus: type: string description: |2- @@ -8826,9 +14465,7 @@ components: 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: @@ -8846,9 +14483,7 @@ components: 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 @@ -8941,6 +14576,8 @@ components: $ref: '#/components/schemas/coinbase.public_rest_api.FcmTradingSessionDetails' future_product_details: $ref: '#/components/schemas/coinbase.public_rest_api.FutureProductDetails' + option_product_details: + $ref: '#/components/schemas/coinbase.public_rest_api.OptionProductDetails' coinbase.public_rest_api.ProductPermissions: type: string enum: @@ -8954,9 +14591,11 @@ components: - UNKNOWN_PRODUCT_TYPE: Unknown product type - SPOT: Spot product - FUTURE: Future product + - OPTION: Option product enum: - SPOT - FUTURE + - OPTION coinbase.public_rest_api.QuoteResponse: title: Copied from https://github.cbhq.net/institutional/trading/blob/3e6da61aceb64c7cbe6f0c0f8fbdb98fd3e868dc/proxy/trading/protos/coinbase/brokerage/proxy/trading/api/orderentry.proto#L366-L370 type: object @@ -9006,9 +14645,7 @@ components: description: Maximum quote size for RFQ coinbase.public_rest_api.RateType: type: string - default: RATE_TYPE_UNSET enum: - - RATE_TYPE_UNSET - BPS - APR_360 - APR_365 @@ -9071,16 +14708,37 @@ components: - 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 - default: RISK_MANAGEMENT_TYPE_UNSPECIFIED enum: - - RISK_MANAGEMENT_TYPE_UNSPECIFIED - RISK_MANAGEMENT_TYPE_MANAGED_BY_FCM - RISK_MANAGEMENT_TYPE_MANAGED_BY_VENUE - coinbase.public_rest_api.RpcConfig: + coinbase.public_rest_api.RotateAPIKeyRequest: type: object properties: - skip_broadcast: - type: boolean + duration_seconds: + type: integer + description: "How long the old key remains active after the new key is approved,\ + \ in seconds. Set to 0 for immediate expiry on approval. Cannot extend\ + \ beyond the original key's expiry." + format: int64 + example: 3600 + coinbase.public_rest_api.RotateAPIKeyResponse: + type: object + properties: + encrypted_credentials: + type: string + description: Base64-encoded encrypted payload containing the new API key + credentials. Decrypt using your current secret_key with HKDF-SHA256 + + AES-256-GCM. + activity_id: + type: string + description: The Prime activity ID tracking the consensus approval for this + rotation. Use with the Activities endpoints to monitor approval status. + example: e8bbed13-fa33-41de-86d5-4335d8f08166 + coinbase.public_rest_api.RpcConfig: + type: object + properties: + skip_broadcast: + type: boolean description: "If true, transaction will not be broadcast to the network" example: false url: @@ -9124,6 +14782,32 @@ components: type: boolean description: Success example: true + coinbase.public_rest_api.SettlementModel: + title: SettlementModel represents the currency a derivative contract settles + in + type: string + description: |- + - SETTLEMENT_MODEL_UNSPECIFIED: Unspecified settlement model + - SETTLEMENT_MODEL_LINEAR: Settles in the quote currency + - SETTLEMENT_MODEL_INVERSE: Settles in the base currency + enum: + - SETTLEMENT_MODEL_LINEAR + - SETTLEMENT_MODEL_INVERSE + coinbase.public_rest_api.SettlementPeriod: + title: SettlementPeriod represents how often a derivative contract expires and + settles + type: string + description: |- + - SETTLEMENT_PERIOD_UNSPECIFIED: Unspecified settlement period + - SETTLEMENT_PERIOD_PERPETUAL: Contract never expires + - SETTLEMENT_PERIOD_DAY: Contract expires daily + - SETTLEMENT_PERIOD_WEEK: Contract expires weekly + - SETTLEMENT_PERIOD_MONTH: Contract expires monthly + enum: + - SETTLEMENT_PERIOD_PERPETUAL + - SETTLEMENT_PERIOD_DAY + - SETTLEMENT_PERIOD_WEEK + - SETTLEMENT_PERIOD_MONTH coinbase.public_rest_api.ShortCollateral: type: object properties: @@ -9160,9 +14844,7 @@ components: - ASC coinbase.public_rest_api.StakeType: type: string - default: STAKE_TYPE_UNSPECIFIED enum: - - STAKE_TYPE_UNSPECIFIED - STAKE_TYPE_INITIAL_DEPOSIT - STAKE_TYPE_TOP_UP coinbase.public_rest_api.StakingClaimRewardsResponse: @@ -9554,6 +15236,7 @@ components: - ONCHAIN_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet - PORTFOLIO_STAKE: Portfolio-level staking operation - PORTFOLIO_UNSTAKE: Portfolio-level unstaking operation + - MERGE_STAKE: On-chain transaction consolidating funds from different addresses belonging to the same wallet. enum: - DEPOSIT - WITHDRAWAL @@ -9590,6 +15273,7 @@ components: - ONCHAIN_TRANSACTION - PORTFOLIO_STAKE - PORTFOLIO_UNSTAKE + - MERGE_STAKE coinbase.public_rest_api.TransactionValidator: required: - transaction_id @@ -9698,13 +15382,13 @@ components: description: |- Account identifier for travel rule compliance. If not provided, defaults to portfolio ID. + vasp_address: + $ref: '#/components/schemas/coinbase.public_rest_api.DetailedAddress' description: Represents a party in a travel rule transfer (originator or beneficiary). coinbase.public_rest_api.TravelRuleStatus: title: Travel rule compliance status for a transaction type: string - default: TRAVEL_RULE_STATUS_UNSPECIFIED enum: - - TRAVEL_RULE_STATUS_UNSPECIFIED - TRAVEL_RULE_STATUS_PENDING - TRAVEL_RULE_STATUS_SUBMITTED coinbase.public_rest_api.TravelRuleWalletType: @@ -9714,16 +15398,12 @@ components: - 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 - default: TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED enum: - - TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED - TRAVEL_RULE_WALLET_TYPE_VASP - TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED coinbase.public_rest_api.UnstakeType: type: string - default: UNSTAKE_TYPE_UNSPECIFIED enum: - - UNSTAKE_TYPE_UNSPECIFIED - UNSTAKE_TYPE_PARTIAL - UNSTAKE_TYPE_FULL coinbase.public_rest_api.UnstakingStatus: @@ -9830,14 +15510,9 @@ components: 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 + description: ValidatorProvider enumerates the ETH validator service providers + accepted for unstaking. enum: - - VALIDATOR_PROVIDER_UNSPECIFIED - VALIDATOR_PROVIDER_COINBASE_CLOUD - VALIDATOR_PROVIDER_MAVAN - VALIDATOR_PROVIDER_FIGMENT @@ -9860,9 +15535,7 @@ components: $ref: '#/components/schemas/coinbase.public_rest_api.StakingStatus' coinbase.public_rest_api.ValidatorStatus: type: string - default: VALIDATOR_STATUS_UNSPECIFIED enum: - - VALIDATOR_STATUS_UNSPECIFIED - VALIDATOR_STATUS_PENDING - VALIDATOR_STATUS_ACTIVE - VALIDATOR_STATUS_EXITING @@ -10026,6 +15699,10 @@ components: type: string description: "Optional validator address, defaults to Coinbase validator.\ \ For SOL, must be the vote account address. Ignored for ETH." + end_date: + type: string + description: Optional delegation end date in ISO date format (e.g. 2026-07-15). + Required for AVAX; minimum 14-day delegation period applies. description: |- WalletStakeInputs contains the custom inputs for staking operations on a wallet. Requirements and supported fields vary by asset type. @@ -10072,14 +15749,16 @@ components: for more information items: $ref: '#/components/schemas/coinbase.public_rest_api.ValidatorAllocation' + validator_address: + type: string + description: Optional validator address to unstake from. Only supported + for a subset of protocols. description: |- WalletUnstakeInputs contains the custom inputs for unstaking operations on a wallet. Requirements and supported fields vary by asset type. coinbase.public_rest_api.WalletVisibility: type: string - default: WALLET_VISIBILITY_UNSPECIFIED enum: - - WALLET_VISIBILITY_UNSPECIFIED - WALLET_VISIBILITY_VISIBLE - WALLET_VISIBILITY_HIDDEN coinbase.public_rest_api.Web3Asset: @@ -10143,9 +15822,7 @@ components: - 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 - default: XM_CALL_STATUS_UNSPECIFIED enum: - - XM_CALL_STATUS_UNSPECIFIED - CALL_STATUS_OPEN - CALL_STATUS_AGED - CALL_STATUS_SETTLED @@ -10157,9 +15834,7 @@ components: - 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 - default: XM_CALL_TYPE_UNSPECIFIED enum: - - XM_CALL_TYPE_UNSPECIFIED - CALL_TYPE_STANDARD - CALL_TYPE_URGENT - CALL_TYPE_DEBIT @@ -10171,9 +15846,7 @@ components: - 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 @@ -10188,14 +15861,77 @@ components: - 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. - default: XM_ENTITY_CALL_STATUS_UNSPECIFIED enum: - - XM_ENTITY_CALL_STATUS_UNSPECIFIED - ENTITY_NO_CALL - ENTITY_OPEN_STANDARD_CALL - ENTITY_OPEN_URGENT_CALL - ENTITY_AGED_CALL - ENTITY_OPEN_DEBIT_CALL + coinbase.public_rest_api.XMLiquidatedAsset: + title: XMLiquidatedAsset provides per-asset detail for a liquidation + type: object + properties: + asset: + type: string + description: Asset currency + example: BTC + liquidated_amount: + type: string + description: Amount (nominal) of the asset that has been liquidated + example: "0.1" + liquidated_notional: + type: string + description: USD notional value of the liquidated amount + example: "11453.17" + remaining_amount: + type: string + description: Amount (nominal) of the asset remaining to be liquidated + example: "0.05" + remaining_notional: + type: string + description: USD notional value of the remaining amount + example: "5726.59" + coinbase.public_rest_api.XMLiquidationDetail: + title: XMLiquidationDetail provides detailed information about a single XM liquidation + type: object + properties: + liquidation_id: + type: string + description: Financing liquidation UUID + example: 63a2577a-930d-413b-81e4-9e77765da8f9 + status: + $ref: '#/components/schemas/coinbase.public_rest_api.XMLiquidationStatus' + shortfall_amount: + type: string + description: USD notional shortfall amount that triggered the liquidation + example: "32083.26" + pre_liquidation_start_time: + type: string + description: Timestamp when the pre-liquidation phase started + format: date-time + margin_summary: + $ref: '#/components/schemas/coinbase.public_rest_api.XMSummary' + liquidation_start_time: + type: string + description: Timestamp when active liquidation started + format: date-time + filled_amount: + type: string + description: USD notional amount that has been filled so far + example: "15000.00" + remaining_amount: + type: string + description: USD notional amount remaining to be liquidated + example: "17083.26" + liquidation_finish_time: + type: string + description: Timestamp when the liquidation finished + format: date-time + asset_breakdown: + type: array + description: Per-asset breakdown of liquidated amounts + items: + $ref: '#/components/schemas/coinbase.public_rest_api.XMLiquidatedAsset' coinbase.public_rest_api.XMLiquidationStatus: title: XMLiquidationStatus is the current status of an XM liquidation type: string @@ -10205,14 +15941,42 @@ components: - XM_LIQUIDATION_STATUS_LIQUIDATED: Liquidation has completed successfully - XM_LIQUIDATION_STATUS_CANCELED: Liquidation was canceled - XM_LIQUIDATION_STATUS_FAILED: Liquidation failed - default: XM_LIQUIDATION_STATUS_UNSET enum: - - XM_LIQUIDATION_STATUS_UNSET - XM_LIQUIDATION_STATUS_PRE_LIQUIDATION - XM_LIQUIDATION_STATUS_LIQUIDATING - XM_LIQUIDATION_STATUS_LIQUIDATED - XM_LIQUIDATION_STATUS_CANCELED - XM_LIQUIDATION_STATUS_FAILED + coinbase.public_rest_api.XMLiquidationSummary: + title: XMLiquidationSummary provides a summary of a single XM liquidation + type: object + properties: + liquidation_id: + type: string + description: Financing liquidation UUID + example: 63a2577a-930d-413b-81e4-9e77765da8f9 + status: + $ref: '#/components/schemas/coinbase.public_rest_api.XMLiquidationStatus' + shortfall_amount: + type: string + description: USD notional shortfall amount that triggered the liquidation + example: "32083.26" + filled_amount: + type: string + description: USD notional amount that has been filled so far + example: "15000.00" + remaining_amount: + type: string + description: USD notional amount remaining to be liquidated + example: "17083.26" + created_at: + type: string + description: Timestamp when the liquidation was created + format: date-time + completed_at: + type: string + description: Timestamp when the liquidation was completed + format: date-time coinbase.public_rest_api.XMLoan: title: XMLoan contains details about a Cross Margin loan type: object @@ -10297,9 +16061,7 @@ components: - 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. - default: XM_MARGIN_LEVEL_UNSPECIFIED enum: - - XM_MARGIN_LEVEL_UNSPECIFIED - HEALTHY_THRESHOLD - DEFICIT_THRESHOLD - WARNING_THRESHOLD @@ -10311,9 +16073,7 @@ components: description: |- - 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 - default: XM_PARTY_UNSPECIFIED enum: - - XM_PARTY_UNSPECIFIED - CBE - FCM coinbase.public_rest_api.XMPosition: @@ -10513,140 +16273,6 @@ components: example: "-36.71" risk_netting_info: $ref: '#/components/schemas/coinbase.public_rest_api.XMRiskNettingInfo' - google.protobuf.Any: - type: object - properties: - '@type': - type: string - description: |- - A URL/resource name that uniquely identifies the type of the serialized - protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must represent - the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a canonical form - (e.g., leading "." is not accepted). - - In practice, teams usually precompile into the binary all types that they - expect it to use in the context of Any. However, for URLs which use the - scheme `http`, `https`, or no scheme, one can optionally set up a type - server that maps type URLs to message definitions as follows: - - * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the official - protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type server - implementations and no plans to implement one. - - Schemes other than `http`, `https` (or the empty scheme) might be - used with implementation specific semantics. - additionalProperties: - type: object - description: |- - `Any` contains an arbitrary serialized protocol buffer message along with a - URL that describes the type of the serialized message. - - Protobuf library provides support to pack/unpack Any values in the form - of utility functions or additional generated methods of the Any type. - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". - - JSON - ==== - The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a field - `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - google.rpc.Status: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - $ref: '#/components/schemas/google.protobuf.Any' google.type.Date: title: |- Represents a whole or partial calendar date, such as a birthday. The time of @@ -10686,6 +16312,6650 @@ components: * [google.type.TimeOfDay][google.type.TimeOfDay] * [google.type.DateTime][google.type.DateTime] * [google.protobuf.Timestamp][google.protobuf.Timestamp] + coinbase.public_rest_api.beta.GetRewardsRateResponse: + type: object + properties: + current_rate: + type: string + description: The current effective rewards rate. + example: "0.045" + available_rates: + type: array + description: "All available rewards rates, including qualifying bounds for\ + \ each rate." + items: + $ref: '#/components/schemas/coinbase.public_rest_api.beta.RewardsRateTier' + description: GetRewardsRateResponse returns the current rewards rate and the + available rates. + coinbase.public_rest_api.beta.RewardsRateTier: + type: object + properties: + rate: + type: string + description: Rate for this tier. + example: "0.045" + lower_limit: + type: string + description: Lower bound of the tier's qualifying criteria (e.g. balance + floor). + example: "0" + upper_limit: + type: string + description: Upper bound of the tier's qualifying criteria. + example: "1000000" + criteria_type: + $ref: '#/components/schemas/coinbase.public_rest_api.beta.RewardsRateTierType' + description: RewardsRateTier is a single tier in the rewards rate card. + coinbase.public_rest_api.beta.RewardsRateTierType: + type: string + description: RewardsRateTierType describes what a rewards rate tier is scoped + by. + enum: + - REWARDS_RATE_TIER_TYPE_BALANCE + - REWARDS_RATE_TIER_TYPE_OPEN_INTEREST + - REWARDS_RATE_TIER_TYPE_PERCENT_VOLUME + coinbase.public_rest_api.AcceptQuoteBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.AcceptQuoteBadRequestSubcode' + trace_id: + type: string + description: AcceptQuoteBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.AcceptQuoteBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - BUYING_POWER_CURRENCY_INVALID + - BUYING_POWER_FAILED_PRECONDITION + - ORDER_REQUEST_INVALID + - ORDER_DUPLICATE_CLIENT_ORDER_ID + - ORDER_REJECTED + - ORDER_PRODUCT_ID_INVALID + - ORDER_PRODUCT_ID_REQUIRED + - ORDER_CLIENT_ORDER_ID_REQUIRED + - ORDER_QUOTE_ID_REQUIRED + - ORDER_SIDE_REQUIRED + - ORDER_SIDE_INVALID + coinbase.public_rest_api.AcceptQuoteForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.AcceptQuoteForbiddenSubcode' + trace_id: + type: string + description: AcceptQuoteForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.AcceptQuoteForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - BUYING_POWER_PERMISSION_DENIED + coinbase.public_rest_api.AcceptQuoteNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.AcceptQuoteNotFoundSubcode' + trace_id: + type: string + description: AcceptQuoteNotFoundErrorResponse documents the HTTP 404 error body. + coinbase.public_rest_api.AcceptQuoteNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + - PORTFOLIO_NOT_FOUND + - BUYING_POWER_NOT_FOUND + coinbase.public_rest_api.BadRequestErrorCode: + type: string + enum: + - VALIDATION_ERROR + - REQUIRED_FIELD_MISSING + - FAILED_PRECONDITION + coinbase.public_rest_api.CancelAdvancedTransferBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelAdvancedTransferBadRequestSubcode' + trace_id: + type: string + description: CancelAdvancedTransferBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.CancelAdvancedTransferBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_INVALID + - ADVANCED_TRANSFER_REQUEST_INVALID + - ADVANCED_TRANSFER_ID_INVALID + - ADVANCED_TRANSFER_CANCEL_PRECONDITION_FAILED + coinbase.public_rest_api.CancelAdvancedTransferForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelAdvancedTransferForbiddenSubcode' + trace_id: + type: string + description: CancelAdvancedTransferForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.CancelAdvancedTransferForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - ADVANCED_TRANSFER_NOT_ENABLED + coinbase.public_rest_api.CancelAdvancedTransferNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelAdvancedTransferNotFoundSubcode' + trace_id: + type: string + description: CancelAdvancedTransferNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.CancelAdvancedTransferNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - TRANSACTION_NOT_FOUND + coinbase.public_rest_api.CancelFuturesSweepBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelFuturesSweepBadRequestSubcode' + trace_id: + type: string + description: CancelFuturesSweepBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.CancelFuturesSweepBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - FCM_INVALID_ARGUMENT + coinbase.public_rest_api.CancelFuturesSweepForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelFuturesSweepForbiddenSubcode' + trace_id: + type: string + description: CancelFuturesSweepForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.CancelFuturesSweepForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.CancelFuturesSweepNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelFuturesSweepNotFoundSubcode' + trace_id: + type: string + description: CancelFuturesSweepNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.CancelFuturesSweepNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - FCM_SWEEP_NOT_FOUND + coinbase.public_rest_api.CancelOrderBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelOrderBadRequestSubcode' + trace_id: + type: string + description: CancelOrderBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.CancelOrderBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ORDER_ID_REQUIRED + - ORDER_ID_INVALID + - ORDER_PRODUCT_ID_INVALID + - ORDER_FULLY_FILLED + - ORDER_BEING_REPLACED + - ORDER_CANCEL_DUPLICATE + - ORDER_SESSION_INVALID + coinbase.public_rest_api.CancelOrderForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelOrderForbiddenSubcode' + trace_id: + type: string + description: CancelOrderForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.CancelOrderForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - ORDER_CANCEL_NOT_ALLOWED + coinbase.public_rest_api.CancelOrderNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelOrderNotFoundSubcode' + trace_id: + type: string + description: CancelOrderNotFoundErrorResponse documents the HTTP 404 error body. + coinbase.public_rest_api.CancelOrderNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ORDER_NOT_FOUND + coinbase.public_rest_api.CreateAdvancedTransferBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAdvancedTransferBadRequestSubcode' + trace_id: + type: string + description: CreateAdvancedTransferBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.CreateAdvancedTransferBadRequestSubcode: + type: string + enum: + - ADVANCED_TRANSFER_REQUEST_INVALID + - ADVANCED_TRANSFER_PRECONDITION_FAILED + - ADVANCED_TRANSFER_DATE_INVALID + - ADVANCED_TRANSFER_TOO_MANY_FUND_MOVEMENTS + - ADVANCED_TRANSFER_COUNTERPARTY_INVALID + - ADVANCED_TRANSFER_AMOUNT_INVALID + - ADVANCED_TRANSFER_COUNTERPARTY_REQUIRED + coinbase.public_rest_api.CreateAdvancedTransferForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAdvancedTransferForbiddenSubcode' + trace_id: + type: string + description: CreateAdvancedTransferForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.CreateAdvancedTransferForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - ADVANCED_TRANSFER_NOT_ENABLED + coinbase.public_rest_api.CreateAdvancedTransferNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAdvancedTransferNotFoundSubcode' + trace_id: + type: string + description: CreateAdvancedTransferNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.CreateAdvancedTransferNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ADVANCED_TRANSFER_NOT_FOUND + coinbase.public_rest_api.CreateAllocationBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAllocationBadRequestSubcode' + trace_id: + type: string + description: CreateAllocationBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.CreateAllocationBadRequestSubcode: + type: string + enum: + - PORTFOLIO_TYPE_UNSUPPORTED + - PORTFOLIO_ID_INVALID + - ALLOCATION_ID_REQUIRED + - ALLOCATION_NETTING_ID_REQUIRED + - ALLOCATION_REQUEST_INVALID + - ALLOCATION_PRECONDITION_FAILED + - ALLOCATION_SOURCE_PORTFOLIO_ID_REQUIRED + - ALLOCATION_DESTINATION_PORTFOLIO_ID_REQUIRED + - ALLOCATION_ORDERS_MIXED_SIDES + - ALLOCATION_ORDERS_MIXED_PRODUCTS + - ALLOCATION_ORDER_NOT_TERMINAL + - ALLOCATION_ORDER_TOO_OLD + - ALLOCATION_ORDER_ALREADY_ALLOCATED + coinbase.public_rest_api.CreateAllocationForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAllocationForbiddenSubcode' + trace_id: + type: string + description: CreateAllocationForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.CreateAllocationForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.CreateAllocationNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAllocationNotFoundSubcode' + trace_id: + type: string + description: CreateAllocationNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.CreateAllocationNotFoundSubcode: + type: string + enum: + - PORTFOLIO_NOT_FOUND + - ALLOCATION_NOT_FOUND + coinbase.public_rest_api.CreateConversionBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateConversionBadRequestSubcode' + trace_id: + type: string + description: CreateConversionBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.CreateConversionBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_INVALID + - WALLET_ID_INVALID + - CONVERSION_DESTINATION_INVALID + - CONVERSION_IDEMPOTENCY_KEY_INVALID + - CONVERSION_AMOUNT_INVALID + - CONVERSION_SOURCE_SYMBOL_REQUIRED + - CONVERSION_DESTINATION_REQUIRED + - CONVERSION_REQUEST_INVALID + - CONVERSION_FAILED_PRECONDITION + coinbase.public_rest_api.CreateConversionForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateConversionForbiddenSubcode' + trace_id: + type: string + description: CreateConversionForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.CreateConversionForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - CONVERSION_PERMISSION_DENIED + coinbase.public_rest_api.CreateConversionNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateConversionNotFoundSubcode' + trace_id: + type: string + description: CreateConversionNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.CreateConversionNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - CONVERSION_WALLET_NOT_FOUND + coinbase.public_rest_api.CreateNetAllocationBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNetAllocationBadRequestSubcode' + trace_id: + type: string + description: CreateNetAllocationBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.CreateNetAllocationBadRequestSubcode: + type: string + enum: + - PORTFOLIO_TYPE_UNSUPPORTED + - PORTFOLIO_ID_INVALID + - ALLOCATION_ID_REQUIRED + - ALLOCATION_NETTING_ID_REQUIRED + - ALLOCATION_REQUEST_INVALID + - ALLOCATION_PRECONDITION_FAILED + - ALLOCATION_SOURCE_PORTFOLIO_ID_REQUIRED + - ALLOCATION_DESTINATION_PORTFOLIO_ID_REQUIRED + - ALLOCATION_ORDERS_MIXED_SIDES + - ALLOCATION_ORDERS_MIXED_PRODUCTS + - ALLOCATION_ORDER_NOT_TERMINAL + - ALLOCATION_ORDER_TOO_OLD + - ALLOCATION_ORDER_ALREADY_ALLOCATED + coinbase.public_rest_api.CreateNetAllocationForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNetAllocationForbiddenSubcode' + trace_id: + type: string + description: CreateNetAllocationForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.CreateNetAllocationForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.CreateNetAllocationNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNetAllocationNotFoundSubcode' + trace_id: + type: string + description: CreateNetAllocationNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.CreateNetAllocationNotFoundSubcode: + type: string + enum: + - PORTFOLIO_NOT_FOUND + - ALLOCATION_NOT_FOUND + coinbase.public_rest_api.CreateNewLocatesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNewLocatesBadRequestSubcode' + trace_id: + type: string + description: CreateNewLocatesBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.CreateNewLocatesBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - LOCATE_DATE_INVALID + - LOCATE_REQUEST_INVALID + - LOCATE_FAILED_PRECONDITION + - LOCATE_DATE_REQUIRED + - LOCATE_SYMBOL_REQUIRED + - LOCATE_AMOUNT_REQUIRED + coinbase.public_rest_api.CreateNewLocatesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNewLocatesForbiddenSubcode' + trace_id: + type: string + description: CreateNewLocatesForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.CreateNewLocatesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.CreateNewLocatesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNewLocatesNotFoundSubcode' + trace_id: + type: string + description: CreateNewLocatesNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.CreateNewLocatesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.CreateOnchainAddressGroupBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainAddressGroupBadRequestSubcode' + trace_id: + type: string + description: CreateOnchainAddressGroupBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.CreateOnchainAddressGroupBadRequestSubcode: + type: string + enum: + - ONCHAIN_ADDRESS_GROUP_REQUEST_INVALID + coinbase.public_rest_api.CreateOnchainAddressGroupForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainAddressGroupForbiddenSubcode' + trace_id: + type: string + description: CreateOnchainAddressGroupForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.CreateOnchainAddressGroupForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.CreateOnchainAddressGroupNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainAddressGroupNotFoundSubcode' + trace_id: + type: string + description: CreateOnchainAddressGroupNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.CreateOnchainAddressGroupNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.CreateOnchainTransactionBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainTransactionBadRequestSubcode' + trace_id: + type: string + description: CreateOnchainTransactionBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.CreateOnchainTransactionBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_TYPE_NOT_SUPPORTED + - ONCHAIN_TRANSACTION_REQUEST_INVALID + - ONCHAIN_TRANSACTION_RAW_UNSIGNED_TXN_REQUIRED + - ONCHAIN_TRANSACTION_RAW_UNSIGNED_TXN_INVALID + - ONCHAIN_TRANSACTION_EVM_PARAMS_REQUIRED + - ONCHAIN_TRANSACTION_EVM_PARAMS_INVALID + - ONCHAIN_TRANSACTION_REPLACED_TRANSACTION_ID_INVALID + - ONCHAIN_TRANSACTION_DISABLE_DYNAMIC_NONCE_INVALID + - ONCHAIN_TRANSACTION_CHAIN_ID_REQUIRED + - ONCHAIN_TRANSACTION_CHAIN_ID_INVALID + - ONCHAIN_TRANSACTION_NETWORK_NAME_REQUIRED + - ONCHAIN_TRANSACTION_RPC_URL_INVALID + coinbase.public_rest_api.CreateOnchainTransactionForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainTransactionForbiddenSubcode' + trace_id: + type: string + description: CreateOnchainTransactionForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.CreateOnchainTransactionForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.CreateOnchainTransactionNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainTransactionNotFoundSubcode' + trace_id: + type: string + description: CreateOnchainTransactionNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.CreateOnchainTransactionNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.CreateOrderBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOrderBadRequestSubcode' + trace_id: + type: string + description: CreateOrderBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.CreateOrderBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - BUYING_POWER_CURRENCY_INVALID + - BUYING_POWER_FAILED_PRECONDITION + - ORDER_REQUEST_INVALID + - ORDER_STOP_LIMIT_NOT_ENABLED + - ORDER_PEG_NOT_ENABLED + - ORDER_DUPLICATE_CLIENT_ORDER_ID + - ORDER_REJECTED + - ORDER_PRODUCT_ID_INVALID + - ORDER_TYPE_NOT_ALLOWED + - ORDER_TIF_NOT_ENABLED + - ORDER_FAILED_PRECONDITION + - ORDER_SIDE_INVALID + - ORDER_SIZE_REQUIRED + - ORDER_SIZE_INVALID + - ORDER_DISPLAY_SIZE_INVALID + - ORDER_PRICE_INVALID + - ORDER_STOP_PRICE_INVALID + - ORDER_TIME_IN_FORCE_INVALID + - ORDER_TIME_RANGE_INVALID + - ORDER_PEG_OFFSET_TYPE_INVALID + coinbase.public_rest_api.CreateOrderForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOrderForbiddenSubcode' + trace_id: + type: string + description: CreateOrderForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.CreateOrderForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - BUYING_POWER_PERMISSION_DENIED + coinbase.public_rest_api.CreateOrderNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOrderNotFoundSubcode' + trace_id: + type: string + description: CreateOrderNotFoundErrorResponse documents the HTTP 404 error body. + coinbase.public_rest_api.CreateOrderNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + - PORTFOLIO_NOT_FOUND + - BUYING_POWER_NOT_FOUND + coinbase.public_rest_api.CreatePortfolioAddressBookEntryBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreatePortfolioAddressBookEntryBadRequestSubcode' + trace_id: + type: string + description: CreatePortfolioAddressBookEntryBadRequestErrorResponse documents + the HTTP 400 error body. + coinbase.public_rest_api.CreatePortfolioAddressBookEntryBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - ADDRESS_BOOK_INVALID_ARGUMENT + - ADDRESS_BOOK_FAILED_PRECONDITION + - ADDRESS_BOOK_ADDRESS_REQUIRED + - ADDRESS_BOOK_CURRENCY_SYMBOL_REQUIRED + - ADDRESS_BOOK_NAME_REQUIRED + coinbase.public_rest_api.CreatePortfolioAddressBookEntryForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreatePortfolioAddressBookEntryForbiddenSubcode' + trace_id: + type: string + description: CreatePortfolioAddressBookEntryForbiddenErrorResponse documents + the HTTP 403 error body. + coinbase.public_rest_api.CreatePortfolioAddressBookEntryForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.CreatePortfolioAddressBookEntryNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreatePortfolioAddressBookEntryNotFoundSubcode' + trace_id: + type: string + description: CreatePortfolioAddressBookEntryNotFoundErrorResponse documents + the HTTP 404 error body. + coinbase.public_rest_api.CreatePortfolioAddressBookEntryNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ADDRESS_BOOK_NOT_FOUND + coinbase.public_rest_api.CreateQuoteRequestBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateQuoteRequestBadRequestSubcode' + trace_id: + type: string + description: CreateQuoteRequestBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.CreateQuoteRequestBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - BUYING_POWER_CURRENCY_INVALID + - BUYING_POWER_FAILED_PRECONDITION + - ORDER_REQUEST_INVALID + - ORDER_PRODUCT_ID_INVALID + - ORDER_FAILED_PRECONDITION + - ORDER_PRODUCT_ID_REQUIRED + - ORDER_SIDE_REQUIRED + - ORDER_RESOURCE_NOT_FOUND + - ORDER_SIDE_INVALID + - ORDER_SIZE_INVALID + - ORDER_PRICE_INVALID + - ORDER_CLIENT_QUOTE_ID_REQUIRED + - ORDER_QUOTE_DURATION_INVALID + coinbase.public_rest_api.CreateQuoteRequestForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateQuoteRequestForbiddenSubcode' + trace_id: + type: string + description: CreateQuoteRequestForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.CreateQuoteRequestForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - BUYING_POWER_PERMISSION_DENIED + - ORDER_RFQ_NOT_ENABLED + - ORDER_RFQ_SIQ_NOT_ENABLED + coinbase.public_rest_api.CreateQuoteRequestNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateQuoteRequestNotFoundSubcode' + trace_id: + type: string + description: CreateQuoteRequestNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.CreateQuoteRequestNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + - PORTFOLIO_NOT_FOUND + - BUYING_POWER_NOT_FOUND + coinbase.public_rest_api.CreateWalletBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletBadRequestSubcode' + trace_id: + type: string + description: CreateWalletBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.CreateWalletBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_INVALID + - WALLET_TYPE_NOT_SUPPORTED + - WALLET_REQUEST_INVALID + - WALLET_ONCHAIN_SYMBOLS_NOT_ALLOWED + - WALLET_FAILED_PRECONDITION + - WALLET_NETWORK_ID_REQUIRED + - WALLET_NETWORK_INVALID + - WALLET_ONCHAIN_SETUP_UNAVAILABLE + - WALLET_NAME_REQUIRED + - WALLET_SYMBOL_REQUIRED + - WALLET_NETWORK_FAMILY_REQUIRED + - WALLET_NETWORK_FAMILY_NOT_ALLOWED + - WALLET_NETWORK_TYPE_REQUIRED + coinbase.public_rest_api.CreateWalletDepositAddressBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletDepositAddressBadRequestSubcode' + trace_id: + type: string + description: CreateWalletDepositAddressBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.CreateWalletDepositAddressBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_NOT_DEPOSITABLE + - WALLET_DEPOSIT_REQUEST_INVALID + - WALLET_FAILED_PRECONDITION + - WALLET_NETWORK_ID_REQUIRED + - WALLET_NETWORK_INVALID + - WALLET_NETWORK_TYPE_NOT_SUPPORTED + coinbase.public_rest_api.CreateWalletDepositAddressForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletDepositAddressForbiddenSubcode' + trace_id: + type: string + description: CreateWalletDepositAddressForbiddenErrorResponse documents the + HTTP 403 error body. + coinbase.public_rest_api.CreateWalletDepositAddressForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.CreateWalletDepositAddressNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletDepositAddressNotFoundSubcode' + trace_id: + type: string + description: CreateWalletDepositAddressNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.CreateWalletDepositAddressNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.CreateWalletForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletForbiddenSubcode' + trace_id: + type: string + description: CreateWalletForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.CreateWalletForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.CreateWalletNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletNotFoundSubcode' + trace_id: + type: string + description: CreateWalletNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.CreateWalletNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ASSET_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.CreateWalletTransferBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletTransferBadRequestSubcode' + trace_id: + type: string + description: CreateWalletTransferBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.CreateWalletTransferBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_REQUEST_INVALID + - WALLET_FAILED_PRECONDITION + - WALLET_AMOUNT_REQUIRED + - WALLET_IDEMPOTENCY_KEY_REQUIRED + - WALLET_IDEMPOTENCY_KEY_INVALID + - WALLET_CURRENCY_SYMBOL_REQUIRED + - WALLET_TRANSFER_DESTINATION_REQUIRED + - WALLET_TRANSFER_DESTINATION_INVALID + coinbase.public_rest_api.CreateWalletTransferForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletTransferForbiddenSubcode' + trace_id: + type: string + description: CreateWalletTransferForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.CreateWalletTransferForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - WALLET_PORTFOLIO_CREDIT_FROZEN + coinbase.public_rest_api.CreateWalletTransferNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletTransferNotFoundSubcode' + trace_id: + type: string + description: CreateWalletTransferNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.CreateWalletTransferNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.CreateWalletWithdrawalBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletWithdrawalBadRequestSubcode' + trace_id: + type: string + description: CreateWalletWithdrawalBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.CreateWalletWithdrawalBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_REQUEST_INVALID + - WALLET_FAILED_PRECONDITION + - WALLET_NETWORK_INVALID + - WALLET_AMOUNT_REQUIRED + - WALLET_IDEMPOTENCY_KEY_REQUIRED + - WALLET_IDEMPOTENCY_KEY_INVALID + - WALLET_CURRENCY_SYMBOL_REQUIRED + - WALLET_DESTINATION_TYPE_REQUIRED + - WALLET_DESTINATION_TYPE_INVALID + - WALLET_COUNTERPARTY_ID_REQUIRED + coinbase.public_rest_api.CreateWalletWithdrawalForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletWithdrawalForbiddenSubcode' + trace_id: + type: string + description: CreateWalletWithdrawalForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.CreateWalletWithdrawalForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - WALLET_PORTFOLIO_CREDIT_FROZEN + coinbase.public_rest_api.CreateWalletWithdrawalNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletWithdrawalNotFoundSubcode' + trace_id: + type: string + description: CreateWalletWithdrawalNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.CreateWalletWithdrawalNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ASSET_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.DeleteOnchainAddressGroupBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.DeleteOnchainAddressGroupBadRequestSubcode' + trace_id: + type: string + description: DeleteOnchainAddressGroupBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.DeleteOnchainAddressGroupBadRequestSubcode: + type: string + enum: + - ONCHAIN_ADDRESS_GROUP_REQUEST_INVALID + coinbase.public_rest_api.DeleteOnchainAddressGroupForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.DeleteOnchainAddressGroupForbiddenSubcode' + trace_id: + type: string + description: DeleteOnchainAddressGroupForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.DeleteOnchainAddressGroupForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.DeleteOnchainAddressGroupNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.DeleteOnchainAddressGroupNotFoundSubcode' + trace_id: + type: string + description: DeleteOnchainAddressGroupNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.DeleteOnchainAddressGroupNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.EditOrderBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.EditOrderBadRequestSubcode' + trace_id: + type: string + description: EditOrderBadRequestErrorResponse documents the HTTP 400 error body. + coinbase.public_rest_api.EditOrderBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - BUYING_POWER_CURRENCY_INVALID + - BUYING_POWER_FAILED_PRECONDITION + - ORDER_REQUEST_INVALID + - ORDER_DUPLICATE_CLIENT_ORDER_ID + - ORDER_REJECTED + - ORDER_PRODUCT_ID_INVALID + - ORDER_RESOURCE_NOT_FOUND + - ORDER_SIDE_INVALID + coinbase.public_rest_api.EditOrderForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.EditOrderForbiddenSubcode' + trace_id: + type: string + description: EditOrderForbiddenErrorResponse documents the HTTP 403 error body. + coinbase.public_rest_api.EditOrderForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - BUYING_POWER_PERMISSION_DENIED + coinbase.public_rest_api.EditOrderNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.EditOrderNotFoundSubcode' + trace_id: + type: string + description: EditOrderNotFoundErrorResponse documents the HTTP 404 error body. + coinbase.public_rest_api.EditOrderNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + - BUYING_POWER_NOT_FOUND + coinbase.public_rest_api.ForbiddenErrorCode: + type: string + enum: + - PERMISSION_DENIED + coinbase.public_rest_api.GetActivityForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetActivityForbiddenSubcode' + trace_id: + type: string + description: GetActivityForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetActivityForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetActivityNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetActivityNotFoundSubcode' + trace_id: + type: string + description: GetActivityNotFoundErrorResponse documents the HTTP 404 error body. + coinbase.public_rest_api.GetActivityNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ACTIVITY_NOT_FOUND + coinbase.public_rest_api.GetAllocationBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationBadRequestSubcode' + trace_id: + type: string + description: GetAllocationBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetAllocationBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ALLOCATION_ID_REQUIRED + - ALLOCATION_ID_INVALID + - ALLOCATION_NETTING_ID_REQUIRED + - ALLOCATION_NETTING_ID_INVALID + - ALLOCATION_REQUEST_INVALID + coinbase.public_rest_api.GetAllocationForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationForbiddenSubcode' + trace_id: + type: string + description: GetAllocationForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetAllocationForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetAllocationNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationNotFoundSubcode' + trace_id: + type: string + description: GetAllocationNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetAllocationNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ALLOCATION_NOT_FOUND + coinbase.public_rest_api.GetAllocationsByClientNettingIdBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationsByClientNettingIdBadRequestSubcode' + trace_id: + type: string + description: GetAllocationsByClientNettingIdBadRequestErrorResponse documents + the HTTP 400 error body. + coinbase.public_rest_api.GetAllocationsByClientNettingIdBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ALLOCATION_ID_REQUIRED + - ALLOCATION_ID_INVALID + - ALLOCATION_NETTING_ID_REQUIRED + - ALLOCATION_NETTING_ID_INVALID + - ALLOCATION_REQUEST_INVALID + coinbase.public_rest_api.GetAllocationsByClientNettingIdForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationsByClientNettingIdForbiddenSubcode' + trace_id: + type: string + description: GetAllocationsByClientNettingIdForbiddenErrorResponse documents + the HTTP 403 error body. + coinbase.public_rest_api.GetAllocationsByClientNettingIdForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetAllocationsByClientNettingIdNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationsByClientNettingIdNotFoundSubcode' + trace_id: + type: string + description: GetAllocationsByClientNettingIdNotFoundErrorResponse documents + the HTTP 404 error body. + coinbase.public_rest_api.GetAllocationsByClientNettingIdNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ALLOCATION_NOT_FOUND + coinbase.public_rest_api.GetBuyingPowerBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetBuyingPowerBadRequestSubcode' + trace_id: + type: string + description: GetBuyingPowerBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetBuyingPowerBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - BUYING_POWER_BASE_CURRENCY_REQUIRED + - BUYING_POWER_QUOTE_CURRENCY_REQUIRED + - BUYING_POWER_CURRENCY_INVALID + - BUYING_POWER_FAILED_PRECONDITION + coinbase.public_rest_api.GetBuyingPowerForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetBuyingPowerForbiddenSubcode' + trace_id: + type: string + description: GetBuyingPowerForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetBuyingPowerForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - BUYING_POWER_PERMISSION_DENIED + coinbase.public_rest_api.GetBuyingPowerNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetBuyingPowerNotFoundSubcode' + trace_id: + type: string + description: GetBuyingPowerNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetBuyingPowerNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - BUYING_POWER_NOT_FOUND + coinbase.public_rest_api.GetCandlesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCandlesBadRequestSubcode' + trace_id: + type: string + description: GetCandlesBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetCandlesBadRequestSubcode: + type: string + enum: + - CANDLE_REQUEST_INVALID + - CANDLE_TIME_RANGE_INVALID + coinbase.public_rest_api.GetCandlesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCandlesForbiddenSubcode' + trace_id: + type: string + description: GetCandlesForbiddenErrorResponse documents the HTTP 403 error body. + coinbase.public_rest_api.GetCandlesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetCandlesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCandlesNotFoundSubcode' + trace_id: + type: string + description: GetCandlesNotFoundErrorResponse documents the HTTP 404 error body. + coinbase.public_rest_api.GetCandlesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetConversionFeesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetConversionFeesForbiddenSubcode' + trace_id: + type: string + description: GetConversionFeesForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetConversionFeesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - CONVERSION_FEE_FEATURE_DISABLED + - CONVERSION_FEE_NOT_ENABLED_FOR_ORG + coinbase.public_rest_api.GetCrossMarginOverviewBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginOverviewBadRequestSubcode' + trace_id: + type: string + description: GetCrossMarginOverviewBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetCrossMarginOverviewBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - CROSS_MARGIN_INVALID_ARGUMENT + - CROSS_MARGIN_FAILED_PRECONDITION + coinbase.public_rest_api.GetCrossMarginOverviewForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginOverviewForbiddenSubcode' + trace_id: + type: string + description: GetCrossMarginOverviewForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetCrossMarginOverviewForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - CROSS_MARGIN_NOT_ENABLED + coinbase.public_rest_api.GetCrossMarginOverviewNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginOverviewNotFoundSubcode' + trace_id: + type: string + description: GetCrossMarginOverviewNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetCrossMarginOverviewNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + coinbase.public_rest_api.GetCrossMarginPrimeOverviewBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginPrimeOverviewBadRequestSubcode' + trace_id: + type: string + description: GetCrossMarginPrimeOverviewBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.GetCrossMarginPrimeOverviewBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - CROSS_MARGIN_INVALID_ARGUMENT + - CROSS_MARGIN_FAILED_PRECONDITION + coinbase.public_rest_api.GetCrossMarginPrimeOverviewForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginPrimeOverviewForbiddenSubcode' + trace_id: + type: string + description: GetCrossMarginPrimeOverviewForbiddenErrorResponse documents the + HTTP 403 error body. + coinbase.public_rest_api.GetCrossMarginPrimeOverviewForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - CROSS_MARGIN_NOT_ENABLED + coinbase.public_rest_api.GetCrossMarginPrimeOverviewNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginPrimeOverviewNotFoundSubcode' + trace_id: + type: string + description: GetCrossMarginPrimeOverviewNotFoundErrorResponse documents the + HTTP 404 error body. + coinbase.public_rest_api.GetCrossMarginPrimeOverviewNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + coinbase.public_rest_api.GetCrossMarginRiskParametersBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginRiskParametersBadRequestSubcode' + trace_id: + type: string + description: GetCrossMarginRiskParametersBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.GetCrossMarginRiskParametersBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - CROSS_MARGIN_INVALID_ARGUMENT + - CROSS_MARGIN_FAILED_PRECONDITION + coinbase.public_rest_api.GetCrossMarginRiskParametersForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginRiskParametersForbiddenSubcode' + trace_id: + type: string + description: GetCrossMarginRiskParametersForbiddenErrorResponse documents the + HTTP 403 error body. + coinbase.public_rest_api.GetCrossMarginRiskParametersForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - CROSS_MARGIN_NOT_ENABLED + coinbase.public_rest_api.GetCrossMarginRiskParametersNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginRiskParametersNotFoundSubcode' + trace_id: + type: string + description: GetCrossMarginRiskParametersNotFoundErrorResponse documents the + HTTP 404 error body. + coinbase.public_rest_api.GetCrossMarginRiskParametersNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + coinbase.public_rest_api.GetDerivativePositionsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativePositionsBadRequestSubcode' + trace_id: + type: string + description: GetDerivativePositionsBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetDerivativePositionsBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + coinbase.public_rest_api.GetDerivativePositionsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativePositionsForbiddenSubcode' + trace_id: + type: string + description: GetDerivativePositionsForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetDerivativePositionsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetDerivativePositionsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativePositionsNotFoundSubcode' + trace_id: + type: string + description: GetDerivativePositionsNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetDerivativePositionsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_POSITION_NOT_FOUND + coinbase.public_rest_api.GetDerivativesCurrencySummaryBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativesCurrencySummaryBadRequestSubcode' + trace_id: + type: string + description: GetDerivativesCurrencySummaryBadRequestErrorResponse documents + the HTTP 400 error body. + coinbase.public_rest_api.GetDerivativesCurrencySummaryBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + coinbase.public_rest_api.GetDerivativesCurrencySummaryForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativesCurrencySummaryForbiddenSubcode' + trace_id: + type: string + description: GetDerivativesCurrencySummaryForbiddenErrorResponse documents the + HTTP 403 error body. + coinbase.public_rest_api.GetDerivativesCurrencySummaryForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetDerivativesCurrencySummaryNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativesCurrencySummaryNotFoundSubcode' + trace_id: + type: string + description: GetDerivativesCurrencySummaryNotFoundErrorResponse documents the + HTTP 404 error body. + coinbase.public_rest_api.GetDerivativesCurrencySummaryNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - FCM_BALANCE_NOT_FOUND + coinbase.public_rest_api.GetEntityActivitiesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityActivitiesBadRequestSubcode' + trace_id: + type: string + description: GetEntityActivitiesBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetEntityActivitiesBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - ACTIVITY_REQUEST_INVALID + - ACTIVITY_CATEGORY_INVALID + - ACTIVITY_TIME_RANGE_INVALID + - ACTIVITY_STATUS_INVALID + coinbase.public_rest_api.GetEntityActivitiesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityActivitiesForbiddenSubcode' + trace_id: + type: string + description: GetEntityActivitiesForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetEntityActivitiesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - ACTIVITY_ACCESS_DENIED + coinbase.public_rest_api.GetEntityActivitiesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityActivitiesNotFoundSubcode' + trace_id: + type: string + description: GetEntityActivitiesNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetEntityActivitiesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetEntityAssetsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityAssetsBadRequestSubcode' + trace_id: + type: string + description: GetEntityAssetsBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetEntityAssetsBadRequestSubcode: + type: string + enum: + - ASSET_REQUEST_INVALID + coinbase.public_rest_api.GetEntityAssetsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityAssetsForbiddenSubcode' + trace_id: + type: string + description: GetEntityAssetsForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetEntityAssetsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetEntityAssetsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityAssetsNotFoundSubcode' + trace_id: + type: string + description: GetEntityAssetsNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetEntityAssetsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ASSET_NOT_FOUND + coinbase.public_rest_api.GetEntityPaymentMethodDetailsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodDetailsBadRequestSubcode' + trace_id: + type: string + description: GetEntityPaymentMethodDetailsBadRequestErrorResponse documents + the HTTP 400 error body. + coinbase.public_rest_api.GetEntityPaymentMethodDetailsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - PAYMENT_METHOD_ID_REQUIRED + - PAYMENT_METHOD_ID_INVALID + - PAYMENT_METHOD_REQUEST_INVALID + coinbase.public_rest_api.GetEntityPaymentMethodDetailsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodDetailsForbiddenSubcode' + trace_id: + type: string + description: GetEntityPaymentMethodDetailsForbiddenErrorResponse documents the + HTTP 403 error body. + coinbase.public_rest_api.GetEntityPaymentMethodDetailsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetEntityPaymentMethodDetailsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodDetailsNotFoundSubcode' + trace_id: + type: string + description: GetEntityPaymentMethodDetailsNotFoundErrorResponse documents the + HTTP 404 error body. + coinbase.public_rest_api.GetEntityPaymentMethodDetailsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - PAYMENT_METHOD_NOT_FOUND + coinbase.public_rest_api.GetEntityPaymentMethodsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodsBadRequestSubcode' + trace_id: + type: string + description: GetEntityPaymentMethodsBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetEntityPaymentMethodsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - PAYMENT_METHOD_REQUEST_INVALID + coinbase.public_rest_api.GetEntityPaymentMethodsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodsForbiddenSubcode' + trace_id: + type: string + description: GetEntityPaymentMethodsForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetEntityPaymentMethodsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetEntityPaymentMethodsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodsNotFoundSubcode' + trace_id: + type: string + description: GetEntityPaymentMethodsNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetEntityPaymentMethodsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - PAYMENT_METHOD_NOT_FOUND + coinbase.public_rest_api.GetEntityRewardsRateBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityRewardsRateBadRequestSubcode' + trace_id: + type: string + description: GetEntityRewardsRateBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetEntityRewardsRateBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - REWARDS_REQUEST_INVALID + - REWARDS_ENTITY_NOT_ENROLLED + coinbase.public_rest_api.GetEntityRewardsRateForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityRewardsRateForbiddenSubcode' + trace_id: + type: string + description: GetEntityRewardsRateForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetEntityRewardsRateForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - REWARDS_API_FEATURE_DISABLED + coinbase.public_rest_api.GetEntityRewardsRateNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityRewardsRateNotFoundSubcode' + trace_id: + type: string + description: GetEntityRewardsRateNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetEntityRewardsRateNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetEntityUsersBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityUsersBadRequestSubcode' + trace_id: + type: string + description: GetEntityUsersBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetEntityUsersBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + coinbase.public_rest_api.GetEntityUsersForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityUsersForbiddenSubcode' + trace_id: + type: string + description: GetEntityUsersForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetEntityUsersForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetEntityUsersNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityUsersNotFoundSubcode' + trace_id: + type: string + description: GetEntityUsersNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetEntityUsersNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetExistingLocatesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetExistingLocatesBadRequestSubcode' + trace_id: + type: string + description: GetExistingLocatesBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetExistingLocatesBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - LOCATE_DATE_INVALID + - LOCATE_REQUEST_INVALID + - LOCATE_IDS_INVALID + - LOCATE_FAILED_PRECONDITION + coinbase.public_rest_api.GetExistingLocatesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetExistingLocatesForbiddenSubcode' + trace_id: + type: string + description: GetExistingLocatesForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetExistingLocatesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetExistingLocatesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetExistingLocatesNotFoundSubcode' + trace_id: + type: string + description: GetExistingLocatesNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetExistingLocatesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetFcmBalanceBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmBalanceBadRequestSubcode' + trace_id: + type: string + description: GetFcmBalanceBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetFcmBalanceBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - FCM_INVALID_ARGUMENT + coinbase.public_rest_api.GetFcmBalanceForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmBalanceForbiddenSubcode' + trace_id: + type: string + description: GetFcmBalanceForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetFcmBalanceForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetFcmBalanceNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmBalanceNotFoundSubcode' + trace_id: + type: string + description: GetFcmBalanceNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetFcmBalanceNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - FCM_BALANCE_NOT_FOUND + coinbase.public_rest_api.GetFcmEquityBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmEquityBadRequestSubcode' + trace_id: + type: string + description: GetFcmEquityBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetFcmEquityBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + coinbase.public_rest_api.GetFcmEquityForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmEquityForbiddenSubcode' + trace_id: + type: string + description: GetFcmEquityForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetFcmEquityForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetFcmEquityNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmEquityNotFoundSubcode' + trace_id: + type: string + description: GetFcmEquityNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetFcmEquityNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - FCM_EQUITY_NOT_FOUND + coinbase.public_rest_api.GetFcmMarginCallDetailsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmMarginCallDetailsBadRequestSubcode' + trace_id: + type: string + description: GetFcmMarginCallDetailsBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetFcmMarginCallDetailsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - FCM_INVALID_ARGUMENT + coinbase.public_rest_api.GetFcmMarginCallDetailsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmMarginCallDetailsForbiddenSubcode' + trace_id: + type: string + description: GetFcmMarginCallDetailsForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetFcmMarginCallDetailsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetFcmMarginCallDetailsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmMarginCallDetailsNotFoundSubcode' + trace_id: + type: string + description: GetFcmMarginCallDetailsNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetFcmMarginCallDetailsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetFcmRiskLimitsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmRiskLimitsBadRequestSubcode' + trace_id: + type: string + description: GetFcmRiskLimitsBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetFcmRiskLimitsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + coinbase.public_rest_api.GetFcmRiskLimitsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmRiskLimitsForbiddenSubcode' + trace_id: + type: string + description: GetFcmRiskLimitsForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetFcmRiskLimitsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetFcmRiskLimitsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmRiskLimitsNotFoundSubcode' + trace_id: + type: string + description: GetFcmRiskLimitsNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetFcmRiskLimitsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - FCM_RISK_LIMITS_NOT_FOUND + coinbase.public_rest_api.GetFcmSettingsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmSettingsBadRequestSubcode' + trace_id: + type: string + description: GetFcmSettingsBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetFcmSettingsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + coinbase.public_rest_api.GetFcmSettingsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmSettingsForbiddenSubcode' + trace_id: + type: string + description: GetFcmSettingsForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetFcmSettingsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetFcmSettingsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmSettingsNotFoundSubcode' + trace_id: + type: string + description: GetFcmSettingsNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetFcmSettingsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - FCM_ACCOUNT_NOT_FOUND + coinbase.public_rest_api.GetFuturesSweepsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFuturesSweepsBadRequestSubcode' + trace_id: + type: string + description: GetFuturesSweepsBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetFuturesSweepsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - FCM_INVALID_ARGUMENT + coinbase.public_rest_api.GetFuturesSweepsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFuturesSweepsForbiddenSubcode' + trace_id: + type: string + description: GetFuturesSweepsForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetFuturesSweepsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetFuturesSweepsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFuturesSweepsNotFoundSubcode' + trace_id: + type: string + description: GetFuturesSweepsNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetFuturesSweepsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - FCM_SWEEP_NOT_FOUND + coinbase.public_rest_api.GetInterestAccrualsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInterestAccrualsBadRequestSubcode' + trace_id: + type: string + description: GetInterestAccrualsBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetInterestAccrualsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - PORTFOLIO_ID_INVALID + - FINANCING_START_DATE_REQUIRED + - FINANCING_END_DATE_REQUIRED + - FINANCING_START_DATE_INVALID + - FINANCING_END_DATE_INVALID + - FINANCING_ACCRUALS_INVALID_ARGUMENT + - FINANCING_FAILED_PRECONDITION + - FINANCING_ACCRUALS_RANGE_EXCEEDED + coinbase.public_rest_api.GetInterestAccrualsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInterestAccrualsForbiddenSubcode' + trace_id: + type: string + description: GetInterestAccrualsForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetInterestAccrualsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetInterestAccrualsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInterestAccrualsNotFoundSubcode' + trace_id: + type: string + description: GetInterestAccrualsNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetInterestAccrualsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetInvoicesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInvoicesBadRequestSubcode' + trace_id: + type: string + description: GetInvoicesBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetInvoicesBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + coinbase.public_rest_api.GetInvoicesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInvoicesForbiddenSubcode' + trace_id: + type: string + description: GetInvoicesForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetInvoicesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetInvoicesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInvoicesNotFoundSubcode' + trace_id: + type: string + description: GetInvoicesNotFoundErrorResponse documents the HTTP 404 error body. + coinbase.public_rest_api.GetInvoicesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + coinbase.public_rest_api.GetLocateAvailabilitiesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetLocateAvailabilitiesBadRequestSubcode' + trace_id: + type: string + description: GetLocateAvailabilitiesBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetLocateAvailabilitiesBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - LOCATE_DATE_INVALID + - LOCATE_REQUEST_INVALID + - LOCATE_FAILED_PRECONDITION + - LOCATE_DATE_REQUIRED + coinbase.public_rest_api.GetLocateAvailabilitiesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetLocateAvailabilitiesForbiddenSubcode' + trace_id: + type: string + description: GetLocateAvailabilitiesForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetLocateAvailabilitiesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetLocateAvailabilitiesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetLocateAvailabilitiesNotFoundSubcode' + trace_id: + type: string + description: GetLocateAvailabilitiesNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetLocateAvailabilitiesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - LOCATE_AVAILABILITY_NOT_FOUND + coinbase.public_rest_api.GetMarginConversionsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginConversionsBadRequestSubcode' + trace_id: + type: string + description: GetMarginConversionsBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetMarginConversionsBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - FINANCING_START_DATE_REQUIRED + - FINANCING_END_DATE_REQUIRED + - FINANCING_START_DATE_INVALID + - FINANCING_END_DATE_INVALID + - MARGIN_CONVERSION_REQUEST_INVALID + - MARGIN_CONVERSION_FAILED_PRECONDITION + coinbase.public_rest_api.GetMarginConversionsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginConversionsForbiddenSubcode' + trace_id: + type: string + description: GetMarginConversionsForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetMarginConversionsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetMarginConversionsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginConversionsNotFoundSubcode' + trace_id: + type: string + description: GetMarginConversionsNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetMarginConversionsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetMarginInformationBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginInformationBadRequestSubcode' + trace_id: + type: string + description: GetMarginInformationBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetMarginInformationBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - MARGIN_INFORMATION_REQUEST_INVALID + coinbase.public_rest_api.GetMarginInformationForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginInformationForbiddenSubcode' + trace_id: + type: string + description: GetMarginInformationForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetMarginInformationForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetMarginInformationNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginInformationNotFoundSubcode' + trace_id: + type: string + description: GetMarginInformationNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetMarginInformationNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetMarginSummariesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginSummariesBadRequestSubcode' + trace_id: + type: string + description: GetMarginSummariesBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetMarginSummariesBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - FINANCING_START_DATE_INVALID + - FINANCING_END_DATE_INVALID + - MARGIN_SUMMARY_RANGE_INVALID + - MARGIN_SUMMARY_FAILED_PRECONDITION + coinbase.public_rest_api.GetMarginSummariesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginSummariesForbiddenSubcode' + trace_id: + type: string + description: GetMarginSummariesForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetMarginSummariesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetMarginSummariesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginSummariesNotFoundSubcode' + trace_id: + type: string + description: GetMarginSummariesNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetMarginSummariesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetMarketDataBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarketDataBadRequestSubcode' + trace_id: + type: string + description: GetMarketDataBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetMarketDataBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - MARKET_DATA_INVALID_ARGUMENT + coinbase.public_rest_api.GetMarketDataForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarketDataForbiddenSubcode' + trace_id: + type: string + description: GetMarketDataForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetMarketDataForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetMarketDataNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarketDataNotFoundSubcode' + trace_id: + type: string + description: GetMarketDataNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetMarketDataNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - MARKET_DATA_NOT_FOUND + coinbase.public_rest_api.GetOpenOrdersBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOpenOrdersBadRequestSubcode' + trace_id: + type: string + description: GetOpenOrdersBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetOpenOrdersBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ORDER_LIMIT_EXCEEDED + coinbase.public_rest_api.GetOpenOrdersForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOpenOrdersForbiddenSubcode' + trace_id: + type: string + description: GetOpenOrdersForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetOpenOrdersForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetOpenOrdersNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOpenOrdersNotFoundSubcode' + trace_id: + type: string + description: GetOpenOrdersNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetOpenOrdersNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetOrderBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderBadRequestSubcode' + trace_id: + type: string + description: GetOrderBadRequestErrorResponse documents the HTTP 400 error body. + coinbase.public_rest_api.GetOrderBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ORDER_ID_REQUIRED + - ORDER_ID_INVALID + - ORDER_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetOrderEditHistoryBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderEditHistoryBadRequestSubcode' + trace_id: + type: string + description: GetOrderEditHistoryBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetOrderEditHistoryBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ORDER_ID_REQUIRED + - ORDER_ID_INVALID + - ORDER_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetOrderEditHistoryForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderEditHistoryForbiddenSubcode' + trace_id: + type: string + description: GetOrderEditHistoryForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetOrderEditHistoryForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetOrderEditHistoryNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderEditHistoryNotFoundSubcode' + trace_id: + type: string + description: GetOrderEditHistoryNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetOrderEditHistoryNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetOrderFillsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderFillsBadRequestSubcode' + trace_id: + type: string + description: GetOrderFillsBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetOrderFillsBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ORDER_REQUEST_INVALID + - ORDER_LIMIT_EXCEEDED + - ORDER_FILLS_LIMIT_INVALID + coinbase.public_rest_api.GetOrderFillsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderFillsForbiddenSubcode' + trace_id: + type: string + description: GetOrderFillsForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetOrderFillsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetOrderFillsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderFillsNotFoundSubcode' + trace_id: + type: string + description: GetOrderFillsNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetOrderFillsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetOrderForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderForbiddenSubcode' + trace_id: + type: string + description: GetOrderForbiddenErrorResponse documents the HTTP 403 error body. + coinbase.public_rest_api.GetOrderForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetOrderNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderNotFoundSubcode' + trace_id: + type: string + description: GetOrderNotFoundErrorResponse documents the HTTP 404 error body. + coinbase.public_rest_api.GetOrderNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetOrdersBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrdersBadRequestSubcode' + trace_id: + type: string + description: GetOrdersBadRequestErrorResponse documents the HTTP 400 error body. + coinbase.public_rest_api.GetOrdersBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ORDER_STATUS_INVALID + coinbase.public_rest_api.GetOrdersForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrdersForbiddenSubcode' + trace_id: + type: string + description: GetOrdersForbiddenErrorResponse documents the HTTP 403 error body. + coinbase.public_rest_api.GetOrdersForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetOrdersNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrdersNotFoundSubcode' + trace_id: + type: string + description: GetOrdersNotFoundErrorResponse documents the HTTP 404 error body. + coinbase.public_rest_api.GetOrdersNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetPortfolioActivitiesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivitiesBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioActivitiesBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetPortfolioActivitiesBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_INVALID + - ACTIVITY_REQUEST_INVALID + - ACTIVITY_CATEGORY_INVALID + - ACTIVITY_TIME_RANGE_INVALID + - ACTIVITY_STATUS_INVALID + coinbase.public_rest_api.GetPortfolioActivitiesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivitiesForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioActivitiesForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetPortfolioActivitiesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioActivitiesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivitiesNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioActivitiesNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetPortfolioActivitiesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetPortfolioActivityBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivityBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioActivityBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetPortfolioActivityBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_INVALID + - ACTIVITY_PORTFOLIO_ID_MISMATCH + coinbase.public_rest_api.GetPortfolioActivityForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivityForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioActivityForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetPortfolioActivityForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioActivityNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivityNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioActivityNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetPortfolioActivityNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ACTIVITY_NOT_FOUND + coinbase.public_rest_api.GetPortfolioAddressBookBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAddressBookBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioAddressBookBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetPortfolioAddressBookBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ADDRESS_BOOK_INVALID_ARGUMENT + - ADDRESS_BOOK_FAILED_PRECONDITION + coinbase.public_rest_api.GetPortfolioAddressBookForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAddressBookForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioAddressBookForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetPortfolioAddressBookForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioAddressBookNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAddressBookNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioAddressBookNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetPortfolioAddressBookNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ADDRESS_BOOK_NOT_FOUND + coinbase.public_rest_api.GetPortfolioAllocationsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAllocationsBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioAllocationsBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetPortfolioAllocationsBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - ALLOCATION_REQUEST_INVALID + - ALLOCATION_START_DATE_REQUIRED + - ALLOCATION_LIMIT_EXCEEDED + coinbase.public_rest_api.GetPortfolioAllocationsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAllocationsForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioAllocationsForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetPortfolioAllocationsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioAllocationsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAllocationsNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioAllocationsNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetPortfolioAllocationsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetPortfolioBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetPortfolioBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + coinbase.public_rest_api.GetPortfolioBalancesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBalancesBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioBalancesBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetPortfolioBalancesBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - PORTFOLIO_BALANCES_INVALID_ARGUMENT + - ASSET_REQUEST_INVALID + coinbase.public_rest_api.GetPortfolioBalancesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBalancesForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioBalancesForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetPortfolioBalancesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioBalancesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBalancesNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioBalancesNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetPortfolioBalancesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - PORTFOLIO_BALANCES_NOT_FOUND + - ASSET_NOT_FOUND + coinbase.public_rest_api.GetPortfolioCommissionBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCommissionBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioCommissionBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetPortfolioCommissionBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - COMMISSION_PRODUCT_ID_INVALID + - COMMISSION_TRADING_NOT_ENABLED + coinbase.public_rest_api.GetPortfolioCommissionForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCommissionForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioCommissionForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetPortfolioCommissionForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioCommissionNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCommissionNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioCommissionNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetPortfolioCommissionNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetPortfolioCounterpartyIDBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCounterpartyIDBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioCounterpartyIDBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.GetPortfolioCounterpartyIDBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_TYPE_UNSUPPORTED + - PORTFOLIO_ID_INVALID + coinbase.public_rest_api.GetPortfolioCounterpartyIDForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCounterpartyIDForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioCounterpartyIDForbiddenErrorResponse documents the + HTTP 403 error body. + coinbase.public_rest_api.GetPortfolioCounterpartyIDForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioCounterpartyIDNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCounterpartyIDNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioCounterpartyIDNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetPortfolioCounterpartyIDNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - PORTFOLIO_NOT_FOUND + coinbase.public_rest_api.GetPortfolioFillsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioFillsBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioFillsBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetPortfolioFillsBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ORDER_REQUEST_INVALID + - ORDER_LIMIT_EXCEEDED + - ORDER_FILLS_LIMIT_INVALID + - ORDER_FILLS_START_DATE_REQUIRED + - ORDER_FILLS_START_DATE_INVALID + - ORDER_FILLS_END_DATE_INVALID + coinbase.public_rest_api.GetPortfolioFillsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioFillsForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioFillsForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetPortfolioFillsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioFillsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioFillsNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioFillsNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetPortfolioFillsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetPortfolioForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetPortfolioForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioInterestAccrualsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioInterestAccrualsBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioInterestAccrualsBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.GetPortfolioInterestAccrualsBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - FINANCING_START_DATE_REQUIRED + - FINANCING_END_DATE_REQUIRED + - FINANCING_START_DATE_INVALID + - FINANCING_END_DATE_INVALID + - FINANCING_ACCRUALS_INVALID_ARGUMENT + - FINANCING_ACCRUALS_DATE_INVALID + coinbase.public_rest_api.GetPortfolioInterestAccrualsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioInterestAccrualsForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioInterestAccrualsForbiddenErrorResponse documents the + HTTP 403 error body. + coinbase.public_rest_api.GetPortfolioInterestAccrualsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioInterestAccrualsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioInterestAccrualsNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioInterestAccrualsNotFoundErrorResponse documents the + HTTP 404 error body. + coinbase.public_rest_api.GetPortfolioInterestAccrualsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - PORTFOLIO_NOT_FOUND + coinbase.public_rest_api.GetPortfolioNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetPortfolioNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + - PORTFOLIO_NOT_FOUND + coinbase.public_rest_api.GetPortfolioProductsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioProductsBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioProductsBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetPortfolioProductsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - PORTFOLIO_ID_INVALID + - PRODUCT_FUTURES_NOT_ENABLED + - PRODUCT_LIMIT_INVALID + - PRODUCT_OPTIONS_NOT_ENABLED + coinbase.public_rest_api.GetPortfolioProductsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioProductsForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioProductsForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetPortfolioProductsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioProductsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioProductsNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioProductsNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetPortfolioProductsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + - PORTFOLIO_NOT_FOUND + - PRODUCT_NOT_FOUND + coinbase.public_rest_api.GetPortfolioRewardsRateBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioRewardsRateBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioRewardsRateBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetPortfolioRewardsRateBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - REWARDS_REQUEST_INVALID + - REWARDS_ENTITY_NOT_ENROLLED + coinbase.public_rest_api.GetPortfolioRewardsRateForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioRewardsRateForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioRewardsRateForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetPortfolioRewardsRateForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - REWARDS_API_FEATURE_DISABLED + coinbase.public_rest_api.GetPortfolioRewardsRateNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioRewardsRateNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioRewardsRateNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetPortfolioRewardsRateNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetPortfolioTransactionsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioTransactionsBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioTransactionsBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetPortfolioTransactionsBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - TRANSACTION_LIMIT_EXCEEDED + - TRANSACTION_CURSOR_INVALID + - TRANSACTION_TRAVEL_RULE_STATUS_INVALID + - TRANSACTION_FILTER_INVALID + - TRANSACTION_PARAMS_INVALID + coinbase.public_rest_api.GetPortfolioTransactionsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioTransactionsForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioTransactionsForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetPortfolioTransactionsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioTransactionsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioTransactionsNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioTransactionsNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetPortfolioTransactionsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ASSET_NOT_FOUND + coinbase.public_rest_api.GetPortfolioUsersBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioUsersBadRequestSubcode' + trace_id: + type: string + description: GetPortfolioUsersBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetPortfolioUsersBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - PORTFOLIO_USERS_CURSOR_INVALID + - PORTFOLIO_USERS_LIMIT_INVALID + coinbase.public_rest_api.GetPortfolioUsersForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioUsersForbiddenSubcode' + trace_id: + type: string + description: GetPortfolioUsersForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetPortfolioUsersForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfolioUsersNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioUsersNotFoundSubcode' + trace_id: + type: string + description: GetPortfolioUsersNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetPortfolioUsersNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - PORTFOLIO_NOT_FOUND + coinbase.public_rest_api.GetPortfoliosForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfoliosForbiddenSubcode' + trace_id: + type: string + description: GetPortfoliosForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetPortfoliosForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPortfoliosNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfoliosNotFoundSubcode' + trace_id: + type: string + description: GetPortfoliosNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetPortfoliosNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + coinbase.public_rest_api.GetPositionsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPositionsBadRequestSubcode' + trace_id: + type: string + description: GetPositionsBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetPositionsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_POSITION_INVALID_ARGUMENT + coinbase.public_rest_api.GetPositionsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPositionsForbiddenSubcode' + trace_id: + type: string + description: GetPositionsForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetPositionsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPositionsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPositionsNotFoundSubcode' + trace_id: + type: string + description: GetPositionsNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetPositionsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + - ENTITY_POSITION_NOT_FOUND + - FCM_ACCOUNT_NOT_FOUND + coinbase.public_rest_api.GetPostTradeCreditBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPostTradeCreditBadRequestSubcode' + trace_id: + type: string + description: GetPostTradeCreditBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetPostTradeCreditBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_INVALID + coinbase.public_rest_api.GetPostTradeCreditForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPostTradeCreditForbiddenSubcode' + trace_id: + type: string + description: GetPostTradeCreditForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetPostTradeCreditForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetPostTradeCreditNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPostTradeCreditNotFoundSubcode' + trace_id: + type: string + description: GetPostTradeCreditNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetPostTradeCreditNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - FINANCING_PTC_DISABLED_FOR_PM_ENTITY + coinbase.public_rest_api.GetStakingStatusBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetStakingStatusBadRequestSubcode' + trace_id: + type: string + description: GetStakingStatusBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetStakingStatusBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_TYPE_NOT_SUPPORTED + - STAKING_REQUEST_INVALID + - STAKING_CURRENCY_UNSUPPORTED + coinbase.public_rest_api.GetStakingStatusForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetStakingStatusForbiddenSubcode' + trace_id: + type: string + description: GetStakingStatusForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetStakingStatusForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetStakingStatusNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetStakingStatusNotFoundSubcode' + trace_id: + type: string + description: GetStakingStatusNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetStakingStatusNotFoundSubcode: + type: string + enum: + - WALLET_NOT_FOUND + coinbase.public_rest_api.GetTFTieredPricingFeesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTFTieredPricingFeesBadRequestSubcode' + trace_id: + type: string + description: GetTFTieredPricingFeesBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetTFTieredPricingFeesBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - TIERED_PRICING_EFFECTIVE_AT_INVALID + - TIERED_PRICING_REQUEST_INVALID + - TIERED_PRICING_FAILED_PRECONDITION + coinbase.public_rest_api.GetTFTieredPricingFeesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTFTieredPricingFeesForbiddenSubcode' + trace_id: + type: string + description: GetTFTieredPricingFeesForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetTFTieredPricingFeesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetTFTieredPricingFeesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTFTieredPricingFeesNotFoundSubcode' + trace_id: + type: string + description: GetTFTieredPricingFeesNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.GetTFTieredPricingFeesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetTransactionBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionBadRequestSubcode' + trace_id: + type: string + description: GetTransactionBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetTransactionBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - TRANSACTION_ID_REQUIRED + - TRANSACTION_ID_INVALID + coinbase.public_rest_api.GetTransactionForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionForbiddenSubcode' + trace_id: + type: string + description: GetTransactionForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetTransactionForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetTransactionNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionNotFoundSubcode' + trace_id: + type: string + description: GetTransactionNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetTransactionNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - TRANSACTION_NOT_FOUND + coinbase.public_rest_api.GetTransactionTravelRuleDataBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionTravelRuleDataBadRequestSubcode' + trace_id: + type: string + description: GetTransactionTravelRuleDataBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.GetTransactionTravelRuleDataBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - TRANSACTION_ID_REQUIRED + - TRANSACTION_ID_INVALID + coinbase.public_rest_api.GetTransactionTravelRuleDataForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionTravelRuleDataForbiddenSubcode' + trace_id: + type: string + description: GetTransactionTravelRuleDataForbiddenErrorResponse documents the + HTTP 403 error body. + coinbase.public_rest_api.GetTransactionTravelRuleDataForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetTransactionTravelRuleDataNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionTravelRuleDataNotFoundSubcode' + trace_id: + type: string + description: GetTransactionTravelRuleDataNotFoundErrorResponse documents the + HTTP 404 error body. + coinbase.public_rest_api.GetTransactionTravelRuleDataNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - TRANSACTION_NOT_FOUND + - TRANSACTION_TRAVEL_RULE_DATA_NOT_FOUND + coinbase.public_rest_api.GetUnstakingStatusBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetUnstakingStatusBadRequestSubcode' + trace_id: + type: string + description: GetUnstakingStatusBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetUnstakingStatusBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_TYPE_NOT_SUPPORTED + - STAKING_REQUEST_INVALID + - STAKING_CURRENCY_UNSUPPORTED + coinbase.public_rest_api.GetUnstakingStatusForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetUnstakingStatusForbiddenSubcode' + trace_id: + type: string + description: GetUnstakingStatusForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetUnstakingStatusForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetUnstakingStatusNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetUnstakingStatusNotFoundSubcode' + trace_id: + type: string + description: GetUnstakingStatusNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetUnstakingStatusNotFoundSubcode: + type: string + enum: + - WALLET_NOT_FOUND + coinbase.public_rest_api.GetWalletBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBadRequestSubcode' + trace_id: + type: string + description: GetWalletBadRequestErrorResponse documents the HTTP 400 error body. + coinbase.public_rest_api.GetWalletBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + coinbase.public_rest_api.GetWalletBalanceBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBalanceBadRequestSubcode' + trace_id: + type: string + description: GetWalletBalanceBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetWalletBalanceBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_TYPE_NOT_SUPPORTED + coinbase.public_rest_api.GetWalletBalanceForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBalanceForbiddenSubcode' + trace_id: + type: string + description: GetWalletBalanceForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetWalletBalanceForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetWalletBalanceNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBalanceNotFoundSubcode' + trace_id: + type: string + description: GetWalletBalanceNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetWalletBalanceNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.GetWalletDepositInstructionsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletDepositInstructionsBadRequestSubcode' + trace_id: + type: string + description: GetWalletDepositInstructionsBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.GetWalletDepositInstructionsBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ASSET_REQUEST_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_DEPOSIT_TYPE_REQUIRED + - WALLET_METADATA_INVALID + - WALLET_NETWORK_REQUIRED + - WALLET_NOT_DEPOSITABLE + - WALLET_DEPOSIT_REQUEST_INVALID + - WALLET_FAILED_PRECONDITION + coinbase.public_rest_api.GetWalletDepositInstructionsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletDepositInstructionsForbiddenSubcode' + trace_id: + type: string + description: GetWalletDepositInstructionsForbiddenErrorResponse documents the + HTTP 403 error body. + coinbase.public_rest_api.GetWalletDepositInstructionsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetWalletDepositInstructionsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletDepositInstructionsNotFoundSubcode' + trace_id: + type: string + description: GetWalletDepositInstructionsNotFoundErrorResponse documents the + HTTP 404 error body. + coinbase.public_rest_api.GetWalletDepositInstructionsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - PORTFOLIO_NOT_FOUND + - ASSET_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.GetWalletForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletForbiddenSubcode' + trace_id: + type: string + description: GetWalletForbiddenErrorResponse documents the HTTP 403 error body. + coinbase.public_rest_api.GetWalletForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetWalletNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletNotFoundSubcode' + trace_id: + type: string + description: GetWalletNotFoundErrorResponse documents the HTTP 404 error body. + coinbase.public_rest_api.GetWalletNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.GetWalletTransactionsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletTransactionsBadRequestSubcode' + trace_id: + type: string + description: GetWalletTransactionsBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.GetWalletTransactionsBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - TRANSACTION_CURSOR_INVALID + - TRANSACTION_PARAMS_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + coinbase.public_rest_api.GetWalletTransactionsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletTransactionsForbiddenSubcode' + trace_id: + type: string + description: GetWalletTransactionsForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.GetWalletTransactionsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetWalletTransactionsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletTransactionsNotFoundSubcode' + trace_id: + type: string + description: GetWalletTransactionsNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetWalletTransactionsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.GetWalletsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletsBadRequestSubcode' + trace_id: + type: string + description: GetWalletsBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.GetWalletsBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_REQUEST_INVALID + - WALLET_ONCHAIN_SYMBOLS_NOT_ALLOWED + coinbase.public_rest_api.GetWalletsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletsForbiddenSubcode' + trace_id: + type: string + description: GetWalletsForbiddenErrorResponse documents the HTTP 403 error body. + coinbase.public_rest_api.GetWalletsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetWalletsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletsNotFoundSubcode' + trace_id: + type: string + description: GetWalletsNotFoundErrorResponse documents the HTTP 404 error body. + coinbase.public_rest_api.GetWalletsNotFoundSubcode: + type: string + enum: + - ASSET_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.GetWithdrawalPowerBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWithdrawalPowerBadRequestSubcode' + trace_id: + type: string + description: GetWithdrawalPowerBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetWithdrawalPowerBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - FINANCING_WITHDRAWAL_POWER_INVALID_ARGUMENT + - FINANCING_WITHDRAWAL_POWER_SYMBOL_REQUIRED + coinbase.public_rest_api.GetWithdrawalPowerForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWithdrawalPowerForbiddenSubcode' + trace_id: + type: string + description: GetWithdrawalPowerForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.GetWithdrawalPowerForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.GetWithdrawalPowerNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWithdrawalPowerNotFoundSubcode' + trace_id: + type: string + description: GetWithdrawalPowerNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.GetWithdrawalPowerNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.GetXMLiquidationBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetXMLiquidationBadRequestSubcode' + trace_id: + type: string + description: GetXMLiquidationBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.GetXMLiquidationBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - CROSS_MARGIN_INVALID_ARGUMENT + - CROSS_MARGIN_FAILED_PRECONDITION + coinbase.public_rest_api.GetXMLiquidationForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetXMLiquidationForbiddenSubcode' + trace_id: + type: string + description: GetXMLiquidationForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.GetXMLiquidationForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - CROSS_MARGIN_NOT_ENABLED + coinbase.public_rest_api.GetXMLiquidationNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.GetXMLiquidationNotFoundSubcode' + trace_id: + type: string + description: GetXMLiquidationNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.GetXMLiquidationNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + coinbase.public_rest_api.InternalServerErrorCode: + type: string + enum: + - INTERNAL_ERROR + coinbase.public_rest_api.InternalServerErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerSubcode' + trace_id: + type: string + description: InternalServerErrorResponse documents the HTTP 500 error body. + coinbase.public_rest_api.InternalServerSubcode: + type: string + enum: + - AUTH_AUTHORIZATION_FAILED + coinbase.public_rest_api.ListAdvancedTransferTransactionsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransferTransactionsForbiddenSubcode' + trace_id: + type: string + description: ListAdvancedTransferTransactionsForbiddenErrorResponse documents + the HTTP 403 error body. + coinbase.public_rest_api.ListAdvancedTransferTransactionsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - ADVANCED_TRANSFER_NOT_ENABLED + coinbase.public_rest_api.ListAdvancedTransferTransactionsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransferTransactionsNotFoundSubcode' + trace_id: + type: string + description: ListAdvancedTransferTransactionsNotFoundErrorResponse documents + the HTTP 404 error body. + coinbase.public_rest_api.ListAdvancedTransferTransactionsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - TRANSACTION_NOT_FOUND + coinbase.public_rest_api.ListAdvancedTransfersBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransfersBadRequestSubcode' + trace_id: + type: string + description: ListAdvancedTransfersBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.ListAdvancedTransfersBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ADVANCED_TRANSFER_REQUEST_INVALID + coinbase.public_rest_api.ListAdvancedTransfersForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransfersForbiddenSubcode' + trace_id: + type: string + description: ListAdvancedTransfersForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.ListAdvancedTransfersForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - ADVANCED_TRANSFER_NOT_ENABLED + coinbase.public_rest_api.ListAdvancedTransfersNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransfersNotFoundSubcode' + trace_id: + type: string + description: ListAdvancedTransfersNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.ListAdvancedTransfersNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.ListAggregateEntityPositionsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAggregateEntityPositionsBadRequestSubcode' + trace_id: + type: string + description: ListAggregateEntityPositionsBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.ListAggregateEntityPositionsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - ENTITY_POSITION_LIMIT_INVALID + - ENTITY_POSITION_INVALID_ARGUMENT + coinbase.public_rest_api.ListAggregateEntityPositionsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAggregateEntityPositionsForbiddenSubcode' + trace_id: + type: string + description: ListAggregateEntityPositionsForbiddenErrorResponse documents the + HTTP 403 error body. + coinbase.public_rest_api.ListAggregateEntityPositionsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.ListAggregateEntityPositionsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAggregateEntityPositionsNotFoundSubcode' + trace_id: + type: string + description: ListAggregateEntityPositionsNotFoundErrorResponse documents the + HTTP 404 error body. + coinbase.public_rest_api.ListAggregateEntityPositionsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_POSITION_NOT_FOUND + coinbase.public_rest_api.ListEntityBalancesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityBalancesBadRequestSubcode' + trace_id: + type: string + description: ListEntityBalancesBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.ListEntityBalancesBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - ENTITY_BALANCES_LIMIT_INVALID + - ENTITY_BALANCES_INVALID_ARGUMENT + coinbase.public_rest_api.ListEntityBalancesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityBalancesForbiddenSubcode' + trace_id: + type: string + description: ListEntityBalancesForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.ListEntityBalancesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.ListEntityBalancesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityBalancesNotFoundSubcode' + trace_id: + type: string + description: ListEntityBalancesNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.ListEntityBalancesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_BALANCES_NOT_FOUND + - ASSET_NOT_FOUND + coinbase.public_rest_api.ListEntityPositionsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityPositionsBadRequestSubcode' + trace_id: + type: string + description: ListEntityPositionsBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.ListEntityPositionsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - ENTITY_POSITION_LIMIT_INVALID + - ENTITY_POSITION_INVALID_ARGUMENT + coinbase.public_rest_api.ListEntityPositionsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityPositionsForbiddenSubcode' + trace_id: + type: string + description: ListEntityPositionsForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.ListEntityPositionsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.ListEntityPositionsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityPositionsNotFoundSubcode' + trace_id: + type: string + description: ListEntityPositionsNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.ListEntityPositionsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_POSITION_NOT_FOUND + coinbase.public_rest_api.ListOnchainAddressGroupsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListOnchainAddressGroupsBadRequestSubcode' + trace_id: + type: string + description: ListOnchainAddressGroupsBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.ListOnchainAddressGroupsBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + coinbase.public_rest_api.ListOnchainAddressGroupsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListOnchainAddressGroupsForbiddenSubcode' + trace_id: + type: string + description: ListOnchainAddressGroupsForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.ListOnchainAddressGroupsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.ListOnchainAddressGroupsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListOnchainAddressGroupsNotFoundSubcode' + trace_id: + type: string + description: ListOnchainAddressGroupsNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.ListOnchainAddressGroupsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.ListTFObligationsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTFObligationsBadRequestSubcode' + trace_id: + type: string + description: ListTFObligationsBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.ListTFObligationsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + coinbase.public_rest_api.ListTFObligationsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTFObligationsForbiddenSubcode' + trace_id: + type: string + description: ListTFObligationsForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.ListTFObligationsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.ListTFObligationsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTFObligationsNotFoundSubcode' + trace_id: + type: string + description: ListTFObligationsNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.ListTFObligationsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.ListTransactionValidatorsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTransactionValidatorsBadRequestSubcode' + trace_id: + type: string + description: ListTransactionValidatorsBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.ListTransactionValidatorsBadRequestSubcode: + type: string + enum: + - TRANSACTION_TYPE_UNSUPPORTED + - TRANSACTION_IDS_INVALID + - TRANSACTION_PARAMS_INVALID + coinbase.public_rest_api.ListTransactionValidatorsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTransactionValidatorsForbiddenSubcode' + trace_id: + type: string + description: ListTransactionValidatorsForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.ListTransactionValidatorsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.ListTransactionValidatorsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTransactionValidatorsNotFoundSubcode' + trace_id: + type: string + description: ListTransactionValidatorsNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.ListTransactionValidatorsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - TRANSACTION_NOT_FOUND + coinbase.public_rest_api.ListWalletAddressesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWalletAddressesBadRequestSubcode' + trace_id: + type: string + description: ListWalletAddressesBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.ListWalletAddressesBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_NOT_DEPOSITABLE + - WALLET_DEPOSIT_REQUEST_INVALID + - WALLET_FAILED_PRECONDITION + - WALLET_NETWORK_INVALID + - WALLET_NETWORK_TYPE_NOT_SUPPORTED + coinbase.public_rest_api.ListWalletAddressesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWalletAddressesForbiddenSubcode' + trace_id: + type: string + description: ListWalletAddressesForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.ListWalletAddressesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.ListWalletAddressesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWalletAddressesNotFoundSubcode' + trace_id: + type: string + description: ListWalletAddressesNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.ListWalletAddressesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.ListWeb3WalletBalancesBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWeb3WalletBalancesBadRequestSubcode' + trace_id: + type: string + description: ListWeb3WalletBalancesBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.ListWeb3WalletBalancesBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_TYPE_NOT_SUPPORTED + - WALLET_BALANCES_LIMIT_INVALID + - WALLET_VISIBILITY_STATUSES_INVALID + coinbase.public_rest_api.ListWeb3WalletBalancesForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWeb3WalletBalancesForbiddenSubcode' + trace_id: + type: string + description: ListWeb3WalletBalancesForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.ListWeb3WalletBalancesForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.ListWeb3WalletBalancesNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWeb3WalletBalancesNotFoundSubcode' + trace_id: + type: string + description: ListWeb3WalletBalancesNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.ListWeb3WalletBalancesNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.ListXMLiquidationsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListXMLiquidationsBadRequestSubcode' + trace_id: + type: string + description: ListXMLiquidationsBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.ListXMLiquidationsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - CROSS_MARGIN_INVALID_ARGUMENT + - CROSS_MARGIN_FAILED_PRECONDITION + coinbase.public_rest_api.ListXMLiquidationsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListXMLiquidationsForbiddenSubcode' + trace_id: + type: string + description: ListXMLiquidationsForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.ListXMLiquidationsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - CROSS_MARGIN_NOT_ENABLED + coinbase.public_rest_api.ListXMLiquidationsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ListXMLiquidationsNotFoundSubcode' + trace_id: + type: string + description: ListXMLiquidationsNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.ListXMLiquidationsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + coinbase.public_rest_api.NotFoundErrorCode: + type: string + enum: + - RESOURCE_NOT_FOUND + coinbase.public_rest_api.NotImplementedErrorCode: + type: string + enum: + - NOT_IMPLEMENTED + coinbase.public_rest_api.NotImplementedErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotImplementedErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.NotImplementedSubcode' + trace_id: + type: string + description: NotImplementedErrorResponse documents the HTTP 501 error body. + coinbase.public_rest_api.NotImplementedSubcode: + type: string + enum: + - ENDPOINT_NOT_IMPLEMENTED + coinbase.public_rest_api.OrderPreviewBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.OrderPreviewBadRequestSubcode' + trace_id: + type: string + description: OrderPreviewBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.OrderPreviewBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - BUYING_POWER_CURRENCY_INVALID + - BUYING_POWER_FAILED_PRECONDITION + - ORDER_REQUEST_INVALID + - ORDER_TYPE_BLOCK_UNSUPPORTED + - ORDER_TYPE_RFQ_UNSUPPORTED + - ORDER_FOK_NOT_ENABLED + - ORDER_STOP_LIMIT_NOT_ENABLED + - ORDER_PEG_NOT_ENABLED + - ORDER_DUPLICATE_CLIENT_ORDER_ID + - ORDER_REJECTED + - ORDER_PRODUCT_ID_INVALID + - ORDER_FAILED_PRECONDITION + - ORDER_SIDE_INVALID + - ORDER_SIZE_REQUIRED + - ORDER_SIZE_INVALID + - ORDER_DISPLAY_SIZE_INVALID + - ORDER_PRICE_INVALID + - ORDER_STOP_PRICE_INVALID + - ORDER_TIME_IN_FORCE_INVALID + - ORDER_TIME_RANGE_INVALID + - ORDER_PEG_OFFSET_TYPE_INVALID + coinbase.public_rest_api.OrderPreviewForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.OrderPreviewForbiddenSubcode' + trace_id: + type: string + description: OrderPreviewForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.OrderPreviewForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - BUYING_POWER_PERMISSION_DENIED + coinbase.public_rest_api.OrderPreviewNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.OrderPreviewNotFoundSubcode' + trace_id: + type: string + description: OrderPreviewNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.OrderPreviewNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + - PORTFOLIO_NOT_FOUND + - BUYING_POWER_NOT_FOUND + coinbase.public_rest_api.PortfolioStakingInitiateBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingInitiateBadRequestSubcode' + trace_id: + type: string + description: PortfolioStakingInitiateBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.PortfolioStakingInitiateBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_EXTERNAL_ID_INVALID + - STAKING_REQUEST_INVALID + - STAKING_CURRENCY_UNSUPPORTED + - STAKING_AMOUNT_REQUIRED + - STAKING_AMOUNT_INVALID + - STAKING_NO_ELIGIBLE_WALLETS + - STAKING_BALANCE_NOT_FOUND + - STAKING_AMOUNT_EXCEEDS_BONDABLE_BALANCE + - STAKING_IDEMPOTENCY_KEY_REQUIRED + - STAKING_IDEMPOTENCY_KEY_INVALID + - STAKING_CURRENCY_SYMBOL_REQUIRED + coinbase.public_rest_api.PortfolioStakingInitiateForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingInitiateForbiddenSubcode' + trace_id: + type: string + description: PortfolioStakingInitiateForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.PortfolioStakingInitiateForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.PortfolioStakingInitiateNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingInitiateNotFoundSubcode' + trace_id: + type: string + description: PortfolioStakingInitiateNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.PortfolioStakingInitiateNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.PortfolioStakingUnstakeBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingUnstakeBadRequestSubcode' + trace_id: + type: string + description: PortfolioStakingUnstakeBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.PortfolioStakingUnstakeBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_EXTERNAL_ID_INVALID + - STAKING_REQUEST_INVALID + - STAKING_CURRENCY_UNSUPPORTED + - STAKING_AMOUNT_REQUIRED + - STAKING_AMOUNT_INVALID + - STAKING_AMOUNT_EXCEEDS_UNBONDABLE_BALANCE + - STAKING_NO_ELIGIBLE_WALLETS + - STAKING_BALANCE_NOT_FOUND + - STAKING_PROVIDER_NO_UNBONDABLE_BALANCE + - STAKING_IDEMPOTENCY_KEY_REQUIRED + - STAKING_IDEMPOTENCY_KEY_INVALID + - STAKING_CURRENCY_SYMBOL_REQUIRED + - STAKING_AMOUNT_VALIDATOR_PROVIDER_CONFLICT + - STAKING_VALIDATOR_PROVIDER_REQUIRED + - STAKING_VALIDATOR_PROVIDER_NOT_SUPPORTED + coinbase.public_rest_api.PortfolioStakingUnstakeForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingUnstakeForbiddenSubcode' + trace_id: + type: string + description: PortfolioStakingUnstakeForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.PortfolioStakingUnstakeForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - STAKING_PROVIDER_UNSTAKE_NOT_ENABLED + coinbase.public_rest_api.PortfolioStakingUnstakeNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingUnstakeNotFoundSubcode' + trace_id: + type: string + description: PortfolioStakingUnstakeNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.PortfolioStakingUnstakeNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.PreviewUnstakeBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.PreviewUnstakeBadRequestSubcode' + trace_id: + type: string + description: PreviewUnstakeBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.PreviewUnstakeBadRequestSubcode: + type: string + enum: + - STAKING_CURRENCY_UNSUPPORTED + - STAKING_AMOUNT_REQUIRED + - STAKING_AMOUNT_INVALID + - STAKING_INSUFFICIENT_BALANCE + - STAKING_WALLET_OR_PORTFOLIO_INVALID + - STAKING_AMOUNT_EXCEEDS_UNBONDABLE_BALANCE + - STAKING_WALLET_COLD_ADDRESS_NOT_FOUND + coinbase.public_rest_api.PreviewUnstakeForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.PreviewUnstakeForbiddenSubcode' + trace_id: + type: string + description: PreviewUnstakeForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.PreviewUnstakeForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.RotateAPIKeyBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.RotateAPIKeyBadRequestSubcode' + trace_id: + type: string + description: RotateAPIKeyBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.RotateAPIKeyBadRequestSubcode: + type: string + enum: + - API_KEY_INVALID_DURATION + - API_KEY_ALREADY_ROTATED + coinbase.public_rest_api.RotateAPIKeyForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.RotateAPIKeyForbiddenSubcode' + trace_id: + type: string + description: RotateAPIKeyForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.RotateAPIKeyForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.ScheduleFuturesSweepBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ScheduleFuturesSweepBadRequestSubcode' + trace_id: + type: string + description: ScheduleFuturesSweepBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.ScheduleFuturesSweepBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - FCM_INVALID_ARGUMENT + - FCM_SWEEP_CURRENCY_REQUIRED + coinbase.public_rest_api.ScheduleFuturesSweepForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ScheduleFuturesSweepForbiddenSubcode' + trace_id: + type: string + description: ScheduleFuturesSweepForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.ScheduleFuturesSweepForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.ScheduleFuturesSweepNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ScheduleFuturesSweepNotFoundSubcode' + trace_id: + type: string + description: ScheduleFuturesSweepNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.ScheduleFuturesSweepNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.ServiceUnavailableErrorCode: + type: string + enum: + - SERVICE_UNAVAILABLE + coinbase.public_rest_api.ServiceUnavailableErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableSubcode' + trace_id: + type: string + description: ServiceUnavailableErrorResponse documents the HTTP 503 error body. + coinbase.public_rest_api.ServiceUnavailableSubcode: + type: string + enum: + - SERVER_MAINTENANCE_MODE_ACTIVE + - ORDER_SERVICE_UNAVAILABLE + - WALLET_SERVICE_UNAVAILABLE + - ASSET_SERVICE_UNAVAILABLE + - FINANCING_SERVICE_UNAVAILABLE + - TRANSACTION_SERVICE_UNAVAILABLE + - STAKING_SERVICE_UNAVAILABLE + - ADVANCED_TRANSFER_SERVICE_UNAVAILABLE + coinbase.public_rest_api.SetAutoSweepBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.SetAutoSweepBadRequestSubcode' + trace_id: + type: string + description: SetAutoSweepBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.SetAutoSweepBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - FCM_INVALID_ARGUMENT + coinbase.public_rest_api.SetAutoSweepForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.SetAutoSweepForbiddenSubcode' + trace_id: + type: string + description: SetAutoSweepForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.SetAutoSweepForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.SetAutoSweepNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.SetAutoSweepNotFoundSubcode' + trace_id: + type: string + description: SetAutoSweepNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.SetAutoSweepNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + coinbase.public_rest_api.SetFcmSettingsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.SetFcmSettingsBadRequestSubcode' + trace_id: + type: string + description: SetFcmSettingsBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.SetFcmSettingsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - FCM_INVALID_ARGUMENT + - FCM_TARGET_DERIVATIVES_EXCESS_INVALID + coinbase.public_rest_api.SetFcmSettingsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.SetFcmSettingsForbiddenSubcode' + trace_id: + type: string + description: SetFcmSettingsForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.SetFcmSettingsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.SetFcmSettingsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.SetFcmSettingsNotFoundSubcode' + trace_id: + type: string + description: SetFcmSettingsNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.SetFcmSettingsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - FCM_ACCOUNT_NOT_FOUND + coinbase.public_rest_api.StakingClaimRewardsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingClaimRewardsBadRequestSubcode' + trace_id: + type: string + description: StakingClaimRewardsBadRequestErrorResponse documents the HTTP 400 + error body. + coinbase.public_rest_api.StakingClaimRewardsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - ASSET_REQUEST_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_TYPE_NOT_SUPPORTED + - STAKING_REQUEST_INVALID + - STAKING_CURRENCY_UNSUPPORTED + - STAKING_PRECONDITION_FAILED + - STAKING_AMOUNT_REQUIRED + - STAKING_AMOUNT_INVALID + - STAKING_INSUFFICIENT_BALANCE + - STAKING_WALLET_OR_PORTFOLIO_INVALID + - STAKING_AMOUNT_EXCEEDS_UNBONDABLE_BALANCE + - STAKING_WALLET_COLD_ADDRESS_NOT_FOUND + - STAKING_NO_VALIDATORS_AVAILABLE + - STAKING_CUSTOM_AMOUNT_NOT_SUPPORTED + - STAKING_VALIDATOR_ADDRESS_NOT_SUPPORTED + - STAKING_DESTINATION_ADDRESS_INVALID + - STAKING_ACTION_TYPE_UNSUPPORTED + - STAKING_UNSTAKE_NOT_AVAILABLE + coinbase.public_rest_api.StakingClaimRewardsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingClaimRewardsForbiddenSubcode' + trace_id: + type: string + description: StakingClaimRewardsForbiddenErrorResponse documents the HTTP 403 + error body. + coinbase.public_rest_api.StakingClaimRewardsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.StakingClaimRewardsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingClaimRewardsNotFoundSubcode' + trace_id: + type: string + description: StakingClaimRewardsNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.StakingClaimRewardsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + - PORTFOLIO_NOT_FOUND + - ASSET_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.StakingInitiateBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingInitiateBadRequestSubcode' + trace_id: + type: string + description: StakingInitiateBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.StakingInitiateBadRequestSubcode: + type: string + enum: + - ENTITY_ID_INVALID + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_TYPE_NOT_SUPPORTED + - WALLET_EXTERNAL_ID_INVALID + - STAKING_REQUEST_INVALID + - STAKING_CURRENCY_UNSUPPORTED + - STAKING_PRECONDITION_FAILED + - STAKING_AMOUNT_REQUIRED + - STAKING_AMOUNT_INVALID + - STAKING_INSUFFICIENT_BALANCE + - STAKING_WALLET_OR_PORTFOLIO_INVALID + - STAKING_AMOUNT_EXCEEDS_UNBONDABLE_BALANCE + - STAKING_WALLET_COLD_ADDRESS_NOT_FOUND + - STAKING_NO_VALIDATORS_AVAILABLE + - STAKING_END_DATE_INVALID + - STAKING_CUSTOM_AMOUNT_NOT_SUPPORTED + - STAKING_VALIDATOR_ADDRESS_NOT_SUPPORTED + - STAKING_DESTINATION_ADDRESS_INVALID + - STAKING_ACTION_TYPE_UNSUPPORTED + - STAKING_UNSTAKE_NOT_AVAILABLE + coinbase.public_rest_api.StakingInitiateForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingInitiateForbiddenSubcode' + trace_id: + type: string + description: StakingInitiateForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.StakingInitiateForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - STAKING_NOT_ENABLED + coinbase.public_rest_api.StakingInitiateNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingInitiateNotFoundSubcode' + trace_id: + type: string + description: StakingInitiateNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.StakingInitiateNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + - PORTFOLIO_NOT_FOUND + - ACTIVITY_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.StakingUnstakeBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingUnstakeBadRequestSubcode' + trace_id: + type: string + description: StakingUnstakeBadRequestErrorResponse documents the HTTP 400 error + body. + coinbase.public_rest_api.StakingUnstakeBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - WALLET_ID_REQUIRED + - WALLET_ID_INVALID + - WALLET_TYPE_NOT_SUPPORTED + - WALLET_EXTERNAL_ID_INVALID + - STAKING_REQUEST_INVALID + - STAKING_CURRENCY_UNSUPPORTED + - STAKING_PRECONDITION_FAILED + - STAKING_AMOUNT_REQUIRED + - STAKING_AMOUNT_INVALID + - STAKING_INSUFFICIENT_BALANCE + - STAKING_WALLET_OR_PORTFOLIO_INVALID + - STAKING_AMOUNT_EXCEEDS_UNBONDABLE_BALANCE + - STAKING_WALLET_COLD_ADDRESS_NOT_FOUND + - STAKING_DELEGATED_ADDRESS_NOT_FOUND + - STAKING_CUSTOM_AMOUNT_NOT_SUPPORTED + - STAKING_VALIDATOR_ADDRESS_NOT_SUPPORTED + - STAKING_VALIDATOR_ALLOCATIONS_UNSUPPORTED_CURRENCY + - STAKING_VALIDATOR_ALLOCATION_INCOMPLETE + - STAKING_VALIDATOR_NOT_ELIGIBLE + - STAKING_DESTINATION_ADDRESS_INVALID + - STAKING_ACTION_TYPE_UNSUPPORTED + - STAKING_UNSTAKE_NOT_AVAILABLE + coinbase.public_rest_api.StakingUnstakeForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingUnstakeForbiddenSubcode' + trace_id: + type: string + description: StakingUnstakeForbiddenErrorResponse documents the HTTP 403 error + body. + coinbase.public_rest_api.StakingUnstakeForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + - STAKING_NOT_ENABLED + - STAKING_VALIDATOR_ALLOCATIONS_NOT_ENABLED + coinbase.public_rest_api.StakingUnstakeNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingUnstakeNotFoundSubcode' + trace_id: + type: string + description: StakingUnstakeNotFoundErrorResponse documents the HTTP 404 error + body. + coinbase.public_rest_api.StakingUnstakeNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - WALLET_NOT_FOUND + coinbase.public_rest_api.SubmitDepositTravelRuleDataBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.SubmitDepositTravelRuleDataBadRequestSubcode' + trace_id: + type: string + description: SubmitDepositTravelRuleDataBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.SubmitDepositTravelRuleDataBadRequestSubcode: + type: string + enum: + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - TRANSACTION_TYPE_UNSUPPORTED + - TRANSACTION_TRAVEL_RULE_PARTY_INVALID + - TRANSACTION_ID_REQUIRED + - TRANSACTION_ID_INVALID + coinbase.public_rest_api.SubmitDepositTravelRuleDataForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.SubmitDepositTravelRuleDataForbiddenSubcode' + trace_id: + type: string + description: SubmitDepositTravelRuleDataForbiddenErrorResponse documents the + HTTP 403 error body. + coinbase.public_rest_api.SubmitDepositTravelRuleDataForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.SubmitDepositTravelRuleDataNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.SubmitDepositTravelRuleDataNotFoundSubcode' + trace_id: + type: string + description: SubmitDepositTravelRuleDataNotFoundErrorResponse documents the + HTTP 404 error body. + coinbase.public_rest_api.SubmitDepositTravelRuleDataNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - TRANSACTION_NOT_FOUND + coinbase.public_rest_api.TooManyRequestsErrorCode: + type: string + enum: + - RATE_LIMIT_EXCEEDED + coinbase.public_rest_api.TooManyRequestsErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsSubcode' + trace_id: + type: string + description: TooManyRequestsErrorResponse documents the HTTP 429 error body. + coinbase.public_rest_api.TooManyRequestsSubcode: + type: string + enum: + - SERVER_RATE_LIMIT_EXCEEDED + coinbase.public_rest_api.UnauthorizedErrorCode: + type: string + enum: + - AUTHENTICATION_FAILED + coinbase.public_rest_api.UnauthorizedErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedSubcode' + trace_id: + type: string + description: UnauthorizedErrorResponse documents the HTTP 401 error body. + coinbase.public_rest_api.UnauthorizedSubcode: + type: string + enum: + - AUTH_UNAUTHENTICATED + - FINANCING_PORTFOLIO_MARGIN_NOT_ENABLED + coinbase.public_rest_api.UpdateFundingSettingsBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateFundingSettingsBadRequestSubcode' + trace_id: + type: string + description: UpdateFundingSettingsBadRequestErrorResponse documents the HTTP + 400 error body. + coinbase.public_rest_api.UpdateFundingSettingsBadRequestSubcode: + type: string + enum: + - ENTITY_ID_REQUIRED + - ENTITY_ID_INVALID + - PORTFOLIO_ID_REQUIRED + - PORTFOLIO_ID_INVALID + - CROSS_MARGIN_INVALID_ARGUMENT + - CROSS_MARGIN_FAILED_PRECONDITION + - FUNDING_SETTINGS_EXCESS_TARGET_AMOUNT_INVALID + coinbase.public_rest_api.UpdateFundingSettingsForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateFundingSettingsForbiddenSubcode' + trace_id: + type: string + description: UpdateFundingSettingsForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.UpdateFundingSettingsForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.UpdateFundingSettingsNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateFundingSettingsNotFoundSubcode' + trace_id: + type: string + description: UpdateFundingSettingsNotFoundErrorResponse documents the HTTP 404 + error body. + coinbase.public_rest_api.UpdateFundingSettingsNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND + - ENTITY_NOT_FOUND + coinbase.public_rest_api.UpdateOnchainAddressGroupBadRequestErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.BadRequestErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateOnchainAddressGroupBadRequestSubcode' + trace_id: + type: string + description: UpdateOnchainAddressGroupBadRequestErrorResponse documents the + HTTP 400 error body. + coinbase.public_rest_api.UpdateOnchainAddressGroupBadRequestSubcode: + type: string + enum: + - ONCHAIN_ADDRESS_GROUP_REQUEST_INVALID + coinbase.public_rest_api.UpdateOnchainAddressGroupForbiddenErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.ForbiddenErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateOnchainAddressGroupForbiddenSubcode' + trace_id: + type: string + description: UpdateOnchainAddressGroupForbiddenErrorResponse documents the HTTP + 403 error body. + coinbase.public_rest_api.UpdateOnchainAddressGroupForbiddenSubcode: + type: string + enum: + - AUTH_RESOURCE_ACCESS_DENIED + - MTLS_CERTIFICATE_REQUIRED + - MTLS_CERTIFICATE_REVOKED + - MTLS_CERTIFICATE_INVALID + coinbase.public_rest_api.UpdateOnchainAddressGroupNotFoundErrorResponse: + type: object + properties: + code: + $ref: '#/components/schemas/coinbase.public_rest_api.NotFoundErrorCode' + message: + type: string + subcode: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateOnchainAddressGroupNotFoundSubcode' + trace_id: + type: string + description: UpdateOnchainAddressGroupNotFoundErrorResponse documents the HTTP + 404 error body. + coinbase.public_rest_api.UpdateOnchainAddressGroupNotFoundSubcode: + type: string + enum: + - AUTH_RESOURCE_NOT_FOUND public_rest_apiCreateAllocationRequest: type: object properties: @@ -10740,6 +23010,2081 @@ components: netting_id: type: string description: The ID to identify an in-flight net allocation. + responses: + Unauthorized: + description: "Authentication failed. The request signature, key, or timestamp\ + \ is invalid." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UnauthorizedErrorResponse' + GetActivityForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetActivityForbiddenErrorResponse' + GetActivityNotFound: + description: The requested activity was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetActivityNotFoundErrorResponse' + TooManyRequests: + description: Too many requests. Rate limit exceeded. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.TooManyRequestsErrorResponse' + ServiceUnavailable: + description: Service unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ServiceUnavailableErrorResponse' + CreateAllocationBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAllocationBadRequestErrorResponse' + CreateAllocationForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAllocationForbiddenErrorResponse' + CreateAllocationNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAllocationNotFoundErrorResponse' + CreateNetAllocationBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNetAllocationBadRequestErrorResponse' + CreateNetAllocationForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNetAllocationForbiddenErrorResponse' + CreateNetAllocationNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNetAllocationNotFoundErrorResponse' + RotateAPIKeyBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.RotateAPIKeyBadRequestErrorResponse' + RotateAPIKeyForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.RotateAPIKeyForbiddenErrorResponse' + InternalServer: + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.InternalServerErrorResponse' + GetConversionFeesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetConversionFeesForbiddenErrorResponse' + GetInterestAccrualsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInterestAccrualsBadRequestErrorResponse' + GetInterestAccrualsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInterestAccrualsForbiddenErrorResponse' + GetInterestAccrualsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInterestAccrualsNotFoundErrorResponse' + GetEntityActivitiesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityActivitiesBadRequestErrorResponse' + GetEntityActivitiesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityActivitiesForbiddenErrorResponse' + GetEntityActivitiesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityActivitiesNotFoundErrorResponse' + ListAggregateEntityPositionsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAggregateEntityPositionsBadRequestErrorResponse' + ListAggregateEntityPositionsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAggregateEntityPositionsForbiddenErrorResponse' + ListAggregateEntityPositionsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAggregateEntityPositionsNotFoundErrorResponse' + GetEntityAssetsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityAssetsBadRequestErrorResponse' + GetEntityAssetsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityAssetsForbiddenErrorResponse' + GetEntityAssetsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityAssetsNotFoundErrorResponse' + ListEntityBalancesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityBalancesBadRequestErrorResponse' + ListEntityBalancesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityBalancesForbiddenErrorResponse' + ListEntityBalancesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityBalancesNotFoundErrorResponse' + GetCrossMarginOverviewBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginOverviewBadRequestErrorResponse' + GetCrossMarginOverviewForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginOverviewForbiddenErrorResponse' + GetCrossMarginOverviewNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginOverviewNotFoundErrorResponse' + GetXMLiquidationBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetXMLiquidationBadRequestErrorResponse' + GetXMLiquidationForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetXMLiquidationForbiddenErrorResponse' + GetXMLiquidationNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetXMLiquidationNotFoundErrorResponse' + ListXMLiquidationsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListXMLiquidationsBadRequestErrorResponse' + ListXMLiquidationsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListXMLiquidationsForbiddenErrorResponse' + ListXMLiquidationsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListXMLiquidationsNotFoundErrorResponse' + GetCrossMarginRiskParametersBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginRiskParametersBadRequestErrorResponse' + GetCrossMarginRiskParametersForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginRiskParametersForbiddenErrorResponse' + GetCrossMarginRiskParametersNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginRiskParametersNotFoundErrorResponse' + UpdateFundingSettingsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateFundingSettingsBadRequestErrorResponse' + UpdateFundingSettingsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateFundingSettingsForbiddenErrorResponse' + UpdateFundingSettingsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateFundingSettingsNotFoundErrorResponse' + SetAutoSweepBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SetAutoSweepBadRequestErrorResponse' + SetAutoSweepForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SetAutoSweepForbiddenErrorResponse' + SetAutoSweepNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SetAutoSweepNotFoundErrorResponse' + GetFcmBalanceBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmBalanceBadRequestErrorResponse' + GetFcmBalanceForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmBalanceForbiddenErrorResponse' + GetFcmBalanceNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmBalanceNotFoundErrorResponse' + GetFcmEquityBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmEquityBadRequestErrorResponse' + GetFcmEquityForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmEquityForbiddenErrorResponse' + GetFcmEquityNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmEquityNotFoundErrorResponse' + GetFcmMarginCallDetailsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmMarginCallDetailsBadRequestErrorResponse' + GetFcmMarginCallDetailsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmMarginCallDetailsForbiddenErrorResponse' + GetFcmMarginCallDetailsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmMarginCallDetailsNotFoundErrorResponse' + GetPositionsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPositionsBadRequestErrorResponse' + GetPositionsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPositionsForbiddenErrorResponse' + GetPositionsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPositionsNotFoundErrorResponse' + GetFcmRiskLimitsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmRiskLimitsBadRequestErrorResponse' + GetFcmRiskLimitsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmRiskLimitsForbiddenErrorResponse' + GetFcmRiskLimitsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmRiskLimitsNotFoundErrorResponse' + GetFcmSettingsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmSettingsBadRequestErrorResponse' + GetFcmSettingsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmSettingsForbiddenErrorResponse' + GetFcmSettingsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFcmSettingsNotFoundErrorResponse' + SetFcmSettingsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SetFcmSettingsBadRequestErrorResponse' + SetFcmSettingsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SetFcmSettingsForbiddenErrorResponse' + SetFcmSettingsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SetFcmSettingsNotFoundErrorResponse' + GetFuturesSweepsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFuturesSweepsBadRequestErrorResponse' + GetFuturesSweepsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFuturesSweepsForbiddenErrorResponse' + GetFuturesSweepsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetFuturesSweepsNotFoundErrorResponse' + ScheduleFuturesSweepBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ScheduleFuturesSweepBadRequestErrorResponse' + ScheduleFuturesSweepForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ScheduleFuturesSweepForbiddenErrorResponse' + ScheduleFuturesSweepNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ScheduleFuturesSweepNotFoundErrorResponse' + CancelFuturesSweepBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelFuturesSweepBadRequestErrorResponse' + CancelFuturesSweepForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelFuturesSweepForbiddenErrorResponse' + CancelFuturesSweepNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelFuturesSweepNotFoundErrorResponse' + GetInvoicesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInvoicesBadRequestErrorResponse' + GetInvoicesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInvoicesForbiddenErrorResponse' + GetInvoicesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetInvoicesNotFoundErrorResponse' + GetLocateAvailabilitiesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetLocateAvailabilitiesBadRequestErrorResponse' + GetLocateAvailabilitiesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetLocateAvailabilitiesForbiddenErrorResponse' + GetLocateAvailabilitiesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetLocateAvailabilitiesNotFoundErrorResponse' + GetMarginInformationBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginInformationBadRequestErrorResponse' + GetMarginInformationForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginInformationForbiddenErrorResponse' + GetMarginInformationNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginInformationNotFoundErrorResponse' + GetMarginSummariesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginSummariesBadRequestErrorResponse' + GetMarginSummariesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginSummariesForbiddenErrorResponse' + GetMarginSummariesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginSummariesNotFoundErrorResponse' + GetMarketDataBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarketDataBadRequestErrorResponse' + GetMarketDataForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarketDataForbiddenErrorResponse' + GetMarketDataNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarketDataNotFoundErrorResponse' + GetEntityPaymentMethodsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodsBadRequestErrorResponse' + GetEntityPaymentMethodsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodsForbiddenErrorResponse' + GetEntityPaymentMethodsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodsNotFoundErrorResponse' + GetEntityPaymentMethodDetailsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodDetailsBadRequestErrorResponse' + GetEntityPaymentMethodDetailsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodDetailsForbiddenErrorResponse' + GetEntityPaymentMethodDetailsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityPaymentMethodDetailsNotFoundErrorResponse' + ListEntityPositionsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityPositionsBadRequestErrorResponse' + ListEntityPositionsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityPositionsForbiddenErrorResponse' + ListEntityPositionsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListEntityPositionsNotFoundErrorResponse' + ListTFObligationsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTFObligationsBadRequestErrorResponse' + ListTFObligationsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTFObligationsForbiddenErrorResponse' + ListTFObligationsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTFObligationsNotFoundErrorResponse' + GetTFTieredPricingFeesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTFTieredPricingFeesBadRequestErrorResponse' + GetTFTieredPricingFeesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTFTieredPricingFeesForbiddenErrorResponse' + GetTFTieredPricingFeesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTFTieredPricingFeesNotFoundErrorResponse' + GetEntityUsersBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityUsersBadRequestErrorResponse' + GetEntityUsersForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityUsersForbiddenErrorResponse' + GetEntityUsersNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityUsersNotFoundErrorResponse' + GetPortfoliosForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfoliosForbiddenErrorResponse' + GetPortfoliosNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfoliosNotFoundErrorResponse' + GetPortfolioBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBadRequestErrorResponse' + GetPortfolioForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioForbiddenErrorResponse' + GetPortfolioNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioNotFoundErrorResponse' + AcceptQuoteBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.AcceptQuoteBadRequestErrorResponse' + AcceptQuoteForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.AcceptQuoteForbiddenErrorResponse' + AcceptQuoteNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.AcceptQuoteNotFoundErrorResponse' + GetPortfolioInterestAccrualsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioInterestAccrualsBadRequestErrorResponse' + GetPortfolioInterestAccrualsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioInterestAccrualsForbiddenErrorResponse' + GetPortfolioInterestAccrualsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioInterestAccrualsNotFoundErrorResponse' + GetPortfolioActivitiesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivitiesBadRequestErrorResponse' + GetPortfolioActivitiesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivitiesForbiddenErrorResponse' + GetPortfolioActivitiesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivitiesNotFoundErrorResponse' + GetPortfolioActivityBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivityBadRequestErrorResponse' + GetPortfolioActivityForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivityForbiddenErrorResponse' + GetPortfolioActivityNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioActivityNotFoundErrorResponse' + GetPortfolioAddressBookBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAddressBookBadRequestErrorResponse' + GetPortfolioAddressBookForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAddressBookForbiddenErrorResponse' + GetPortfolioAddressBookNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAddressBookNotFoundErrorResponse' + CreatePortfolioAddressBookEntryBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreatePortfolioAddressBookEntryBadRequestErrorResponse' + CreatePortfolioAddressBookEntryForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreatePortfolioAddressBookEntryForbiddenErrorResponse' + CreatePortfolioAddressBookEntryNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreatePortfolioAddressBookEntryNotFoundErrorResponse' + ListAdvancedTransfersBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransfersBadRequestErrorResponse' + ListAdvancedTransfersForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransfersForbiddenErrorResponse' + ListAdvancedTransfersNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransfersNotFoundErrorResponse' + CreateAdvancedTransferBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAdvancedTransferBadRequestErrorResponse' + CreateAdvancedTransferForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAdvancedTransferForbiddenErrorResponse' + CreateAdvancedTransferNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateAdvancedTransferNotFoundErrorResponse' + CancelAdvancedTransferBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelAdvancedTransferBadRequestErrorResponse' + CancelAdvancedTransferForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelAdvancedTransferForbiddenErrorResponse' + CancelAdvancedTransferNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelAdvancedTransferNotFoundErrorResponse' + ListAdvancedTransferTransactionsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransferTransactionsForbiddenErrorResponse' + ListAdvancedTransferTransactionsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListAdvancedTransferTransactionsNotFoundErrorResponse' + GetPortfolioAllocationsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAllocationsBadRequestErrorResponse' + GetPortfolioAllocationsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAllocationsForbiddenErrorResponse' + GetPortfolioAllocationsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioAllocationsNotFoundErrorResponse' + GetAllocationsByClientNettingIdBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationsByClientNettingIdBadRequestErrorResponse' + GetAllocationsByClientNettingIdForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationsByClientNettingIdForbiddenErrorResponse' + GetAllocationsByClientNettingIdNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationsByClientNettingIdNotFoundErrorResponse' + GetAllocationBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationBadRequestErrorResponse' + GetAllocationForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationForbiddenErrorResponse' + GetAllocationNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetAllocationNotFoundErrorResponse' + GetPortfolioBalancesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBalancesBadRequestErrorResponse' + GetPortfolioBalancesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBalancesForbiddenErrorResponse' + GetPortfolioBalancesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioBalancesNotFoundErrorResponse' + GetBuyingPowerBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetBuyingPowerBadRequestErrorResponse' + GetBuyingPowerForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetBuyingPowerForbiddenErrorResponse' + GetBuyingPowerNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetBuyingPowerNotFoundErrorResponse' + GetCandlesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCandlesBadRequestErrorResponse' + GetCandlesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCandlesForbiddenErrorResponse' + GetCandlesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCandlesNotFoundErrorResponse' + GetPortfolioCommissionBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCommissionBadRequestErrorResponse' + GetPortfolioCommissionForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCommissionForbiddenErrorResponse' + GetPortfolioCommissionNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCommissionNotFoundErrorResponse' + GetPortfolioCounterpartyIDBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCounterpartyIDBadRequestErrorResponse' + GetPortfolioCounterpartyIDForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCounterpartyIDForbiddenErrorResponse' + GetPortfolioCounterpartyIDNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioCounterpartyIDNotFoundErrorResponse' + GetPostTradeCreditBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPostTradeCreditBadRequestErrorResponse' + GetPostTradeCreditForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPostTradeCreditForbiddenErrorResponse' + GetPostTradeCreditNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPostTradeCreditNotFoundErrorResponse' + GetDerivativesCurrencySummaryBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativesCurrencySummaryBadRequestErrorResponse' + GetDerivativesCurrencySummaryForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativesCurrencySummaryForbiddenErrorResponse' + GetDerivativesCurrencySummaryNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativesCurrencySummaryNotFoundErrorResponse' + GetDerivativePositionsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativePositionsBadRequestErrorResponse' + GetDerivativePositionsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativePositionsForbiddenErrorResponse' + GetDerivativePositionsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetDerivativePositionsNotFoundErrorResponse' + GetPortfolioFillsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioFillsBadRequestErrorResponse' + GetPortfolioFillsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioFillsForbiddenErrorResponse' + GetPortfolioFillsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioFillsNotFoundErrorResponse' + GetExistingLocatesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetExistingLocatesBadRequestErrorResponse' + GetExistingLocatesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetExistingLocatesForbiddenErrorResponse' + GetExistingLocatesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetExistingLocatesNotFoundErrorResponse' + CreateNewLocatesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNewLocatesBadRequestErrorResponse' + CreateNewLocatesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNewLocatesForbiddenErrorResponse' + CreateNewLocatesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateNewLocatesNotFoundErrorResponse' + GetMarginConversionsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginConversionsBadRequestErrorResponse' + GetMarginConversionsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginConversionsForbiddenErrorResponse' + GetMarginConversionsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginConversionsNotFoundErrorResponse' + CreateOnchainAddressGroupBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainAddressGroupBadRequestErrorResponse' + CreateOnchainAddressGroupForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainAddressGroupForbiddenErrorResponse' + CreateOnchainAddressGroupNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainAddressGroupNotFoundErrorResponse' + UpdateOnchainAddressGroupBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateOnchainAddressGroupBadRequestErrorResponse' + UpdateOnchainAddressGroupForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateOnchainAddressGroupForbiddenErrorResponse' + UpdateOnchainAddressGroupNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateOnchainAddressGroupNotFoundErrorResponse' + DeleteOnchainAddressGroupBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.DeleteOnchainAddressGroupBadRequestErrorResponse' + DeleteOnchainAddressGroupForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.DeleteOnchainAddressGroupForbiddenErrorResponse' + DeleteOnchainAddressGroupNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.DeleteOnchainAddressGroupNotFoundErrorResponse' + ListOnchainAddressGroupsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListOnchainAddressGroupsBadRequestErrorResponse' + ListOnchainAddressGroupsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListOnchainAddressGroupsForbiddenErrorResponse' + ListOnchainAddressGroupsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListOnchainAddressGroupsNotFoundErrorResponse' + GetOpenOrdersBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOpenOrdersBadRequestErrorResponse' + GetOpenOrdersForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOpenOrdersForbiddenErrorResponse' + GetOpenOrdersNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOpenOrdersNotFoundErrorResponse' + CreateOrderBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOrderBadRequestErrorResponse' + CreateOrderForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOrderForbiddenErrorResponse' + CreateOrderNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOrderNotFoundErrorResponse' + OrderPreviewBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.OrderPreviewBadRequestErrorResponse' + OrderPreviewForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.OrderPreviewForbiddenErrorResponse' + OrderPreviewNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.OrderPreviewNotFoundErrorResponse' + GetOrdersBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrdersBadRequestErrorResponse' + GetOrdersForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrdersForbiddenErrorResponse' + GetOrdersNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrdersNotFoundErrorResponse' + GetOrderBadRequest: + description: "Bad request. portfolio_id or order_id is missing, invalid, or\ + \ the order was not found." + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderBadRequestErrorResponse' + GetOrderForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderForbiddenErrorResponse' + GetOrderNotFound: + description: The requested portfolio or resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderNotFoundErrorResponse' + CancelOrderBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelOrderBadRequestErrorResponse' + CancelOrderForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelOrderForbiddenErrorResponse' + CancelOrderNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CancelOrderNotFoundErrorResponse' + EditOrderBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.EditOrderBadRequestErrorResponse' + EditOrderForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.EditOrderForbiddenErrorResponse' + EditOrderNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.EditOrderNotFoundErrorResponse' + GetOrderEditHistoryBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderEditHistoryBadRequestErrorResponse' + GetOrderEditHistoryForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderEditHistoryForbiddenErrorResponse' + GetOrderEditHistoryNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderEditHistoryNotFoundErrorResponse' + GetOrderFillsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderFillsBadRequestErrorResponse' + GetOrderFillsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderFillsForbiddenErrorResponse' + GetOrderFillsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetOrderFillsNotFoundErrorResponse' + GetPortfolioProductsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioProductsBadRequestErrorResponse' + GetPortfolioProductsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioProductsForbiddenErrorResponse' + GetPortfolioProductsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioProductsNotFoundErrorResponse' + CreateQuoteRequestBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateQuoteRequestBadRequestErrorResponse' + CreateQuoteRequestForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateQuoteRequestForbiddenErrorResponse' + CreateQuoteRequestNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateQuoteRequestNotFoundErrorResponse' + PortfolioStakingInitiateBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingInitiateBadRequestErrorResponse' + PortfolioStakingInitiateForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingInitiateForbiddenErrorResponse' + PortfolioStakingInitiateNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingInitiateNotFoundErrorResponse' + ListTransactionValidatorsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTransactionValidatorsBadRequestErrorResponse' + ListTransactionValidatorsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTransactionValidatorsForbiddenErrorResponse' + ListTransactionValidatorsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListTransactionValidatorsNotFoundErrorResponse' + PortfolioStakingUnstakeBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingUnstakeBadRequestErrorResponse' + PortfolioStakingUnstakeForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingUnstakeForbiddenErrorResponse' + PortfolioStakingUnstakeNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingUnstakeNotFoundErrorResponse' + GetPortfolioTransactionsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioTransactionsBadRequestErrorResponse' + GetPortfolioTransactionsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioTransactionsForbiddenErrorResponse' + GetPortfolioTransactionsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioTransactionsNotFoundErrorResponse' + GetTransactionBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionBadRequestErrorResponse' + GetTransactionForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionForbiddenErrorResponse' + GetTransactionNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionNotFoundErrorResponse' + GetTransactionTravelRuleDataBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionTravelRuleDataBadRequestErrorResponse' + GetTransactionTravelRuleDataForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionTravelRuleDataForbiddenErrorResponse' + GetTransactionTravelRuleDataNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetTransactionTravelRuleDataNotFoundErrorResponse' + SubmitDepositTravelRuleDataBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SubmitDepositTravelRuleDataBadRequestErrorResponse' + SubmitDepositTravelRuleDataForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SubmitDepositTravelRuleDataForbiddenErrorResponse' + SubmitDepositTravelRuleDataNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.SubmitDepositTravelRuleDataNotFoundErrorResponse' + GetPortfolioUsersBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioUsersBadRequestErrorResponse' + GetPortfolioUsersForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioUsersForbiddenErrorResponse' + GetPortfolioUsersNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioUsersNotFoundErrorResponse' + GetWalletsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletsBadRequestErrorResponse' + GetWalletsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletsForbiddenErrorResponse' + GetWalletsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletsNotFoundErrorResponse' + CreateWalletBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletBadRequestErrorResponse' + CreateWalletForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletForbiddenErrorResponse' + CreateWalletNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletNotFoundErrorResponse' + GetWalletBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBadRequestErrorResponse' + GetWalletForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletForbiddenErrorResponse' + GetWalletNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletNotFoundErrorResponse' + ListWalletAddressesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWalletAddressesBadRequestErrorResponse' + ListWalletAddressesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWalletAddressesForbiddenErrorResponse' + ListWalletAddressesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWalletAddressesNotFoundErrorResponse' + CreateWalletDepositAddressBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletDepositAddressBadRequestErrorResponse' + CreateWalletDepositAddressForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletDepositAddressForbiddenErrorResponse' + CreateWalletDepositAddressNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletDepositAddressNotFoundErrorResponse' + GetWalletBalanceBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBalanceBadRequestErrorResponse' + GetWalletBalanceForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBalanceForbiddenErrorResponse' + GetWalletBalanceNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletBalanceNotFoundErrorResponse' + CreateConversionBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateConversionBadRequestErrorResponse' + CreateConversionForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateConversionForbiddenErrorResponse' + CreateConversionNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateConversionNotFoundErrorResponse' + GetWalletDepositInstructionsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletDepositInstructionsBadRequestErrorResponse' + GetWalletDepositInstructionsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletDepositInstructionsForbiddenErrorResponse' + GetWalletDepositInstructionsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletDepositInstructionsNotFoundErrorResponse' + CreateOnchainTransactionBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainTransactionBadRequestErrorResponse' + CreateOnchainTransactionForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainTransactionForbiddenErrorResponse' + CreateOnchainTransactionNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateOnchainTransactionNotFoundErrorResponse' + StakingClaimRewardsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingClaimRewardsBadRequestErrorResponse' + StakingClaimRewardsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingClaimRewardsForbiddenErrorResponse' + StakingClaimRewardsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingClaimRewardsNotFoundErrorResponse' + StakingInitiateBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingInitiateBadRequestErrorResponse' + StakingInitiateForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingInitiateForbiddenErrorResponse' + StakingInitiateNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingInitiateNotFoundErrorResponse' + GetStakingStatusBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetStakingStatusBadRequestErrorResponse' + GetStakingStatusForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetStakingStatusForbiddenErrorResponse' + GetStakingStatusNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetStakingStatusNotFoundErrorResponse' + StakingUnstakeBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingUnstakeBadRequestErrorResponse' + StakingUnstakeForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingUnstakeForbiddenErrorResponse' + StakingUnstakeNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.StakingUnstakeNotFoundErrorResponse' + PreviewUnstakeBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PreviewUnstakeBadRequestErrorResponse' + PreviewUnstakeForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.PreviewUnstakeForbiddenErrorResponse' + GetUnstakingStatusBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetUnstakingStatusBadRequestErrorResponse' + GetUnstakingStatusForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetUnstakingStatusForbiddenErrorResponse' + GetUnstakingStatusNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetUnstakingStatusNotFoundErrorResponse' + GetWalletTransactionsBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletTransactionsBadRequestErrorResponse' + GetWalletTransactionsForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletTransactionsForbiddenErrorResponse' + GetWalletTransactionsNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWalletTransactionsNotFoundErrorResponse' + CreateWalletTransferBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletTransferBadRequestErrorResponse' + CreateWalletTransferForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletTransferForbiddenErrorResponse' + CreateWalletTransferNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletTransferNotFoundErrorResponse' + ListWeb3WalletBalancesBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWeb3WalletBalancesBadRequestErrorResponse' + ListWeb3WalletBalancesForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWeb3WalletBalancesForbiddenErrorResponse' + ListWeb3WalletBalancesNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.ListWeb3WalletBalancesNotFoundErrorResponse' + CreateWalletWithdrawalBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletWithdrawalBadRequestErrorResponse' + CreateWalletWithdrawalForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletWithdrawalForbiddenErrorResponse' + CreateWalletWithdrawalNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.CreateWalletWithdrawalNotFoundErrorResponse' + GetWithdrawalPowerBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWithdrawalPowerBadRequestErrorResponse' + GetWithdrawalPowerForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWithdrawalPowerForbiddenErrorResponse' + GetWithdrawalPowerNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetWithdrawalPowerNotFoundErrorResponse' + GetCrossMarginPrimeOverviewBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginPrimeOverviewBadRequestErrorResponse' + GetCrossMarginPrimeOverviewForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginPrimeOverviewForbiddenErrorResponse' + GetCrossMarginPrimeOverviewNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginPrimeOverviewNotFoundErrorResponse' + GetEntityRewardsRateBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityRewardsRateBadRequestErrorResponse' + GetEntityRewardsRateForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityRewardsRateForbiddenErrorResponse' + GetEntityRewardsRateNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetEntityRewardsRateNotFoundErrorResponse' + GetPortfolioRewardsRateBadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioRewardsRateBadRequestErrorResponse' + GetPortfolioRewardsRateForbidden: + description: Permission denied. The API key lacks the required scope for this + resource. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioRewardsRateForbiddenErrorResponse' + GetPortfolioRewardsRateNotFound: + description: The requested resource was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetPortfolioRewardsRateNotFoundErrorResponse' x-readme: explorer-enabled: false samples-enabled: false diff --git a/src/main/java/com/coinbase/prime/model/Accrual.java b/src/main/java/com/coinbase/prime/model/Accrual.java index 420d8d61..58fc4be7 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 ad4c7a7a..79ea8b03 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 19de3627..348c2b7a 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 b6c33416..f74ca5a9 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 5a2ae77a..40a95715 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 a3451607..05a0ab05 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 f9848a64..c5bc51b0 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 361e8238..3d33f1fb 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 38fa3f6a..c977cc8a 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 fcad19e2..6177759d 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 c1bfb532..98f2588b 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 3d8f2a50..6bc495c8 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 7f64ceaf..6ec60f24 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 16f8af27..9bb40291 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 f7a6a375..86462a25 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 bab77eb9..ffbc3b03 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 32d43bf5..bde8a45e 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 afd769a3..668152a9 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/BetaRewardsRateTier.java b/src/main/java/com/coinbase/prime/model/BetaRewardsRateTier.java new file mode 100644 index 00000000..1a2da3e3 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/BetaRewardsRateTier.java @@ -0,0 +1,115 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.enums.BetaRewardsRateTierType; +import com.fasterxml.jackson.annotation.JsonProperty; + +public class BetaRewardsRateTier { + /** + * Rate for this tier. + */ + private String rate; + + /** + * Lower bound of the tier's qualifying criteria (e.g. balance floor). + */ + @JsonProperty("lower_limit") + private String lowerLimit; + + /** + * Upper bound of the tier's qualifying criteria. + */ + @JsonProperty("upper_limit") + private String upperLimit; + + @JsonProperty("criteria_type") + private BetaRewardsRateTierType criteriaType; + + public BetaRewardsRateTier() { + } + + public BetaRewardsRateTier(Builder builder) { + this.rate = builder.rate; + this.lowerLimit = builder.lowerLimit; + this.upperLimit = builder.upperLimit; + this.criteriaType = builder.criteriaType; + } + public String getRate() { + return rate; + } + + public void setRate(String rate) { + this.rate = rate; + } + public String getLowerLimit() { + return lowerLimit; + } + + public void setLowerLimit(String lowerLimit) { + this.lowerLimit = lowerLimit; + } + public String getUpperLimit() { + return upperLimit; + } + + public void setUpperLimit(String upperLimit) { + this.upperLimit = upperLimit; + } + public BetaRewardsRateTierType getCriteriaType() { + return criteriaType; + } + + public void setCriteriaType(BetaRewardsRateTierType criteriaType) { + this.criteriaType = criteriaType; + } + public static class Builder { + private String rate; + + private String lowerLimit; + + private String upperLimit; + + private BetaRewardsRateTierType criteriaType; + + public Builder rate(String rate) { + this.rate = rate; + return this; + } + + public Builder lowerLimit(String lowerLimit) { + this.lowerLimit = lowerLimit; + return this; + } + + public Builder upperLimit(String upperLimit) { + this.upperLimit = upperLimit; + return this; + } + + public Builder criteriaType(BetaRewardsRateTierType criteriaType) { + this.criteriaType = criteriaType; + return this; + } + + public BetaRewardsRateTier build() { + return new BetaRewardsRateTier(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java b/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java index f53a2ece..aa458c05 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. The Settlement Date represents the date contractually agreed upon by the transacting parties; actual settlement will occur upon completion of the transfer, which may differ from such agreed date. + */ + @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 6e55858e..a07667e2 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 10db8cad..b0ffa812 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 5594bd22..09975bff 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/ComboLeg.java b/src/main/java/com/coinbase/prime/model/ComboLeg.java new file mode 100644 index 00000000..7018d8e9 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/ComboLeg.java @@ -0,0 +1,96 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.enums.OrderSide; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ComboLeg describes a single leg within an options combo order. */ +public class ComboLeg { + /** + * The product identifier for the options instrument (e.g., \"BTC-28MAR25-50000-C\"). + */ + @JsonProperty("product_id") + private String productId; + + private String quantity; + + /** + * - UNKNOWN_ORDER_SIDE: nil value + * - BUY: Buy order + * - SELL: Sell order + */ + private OrderSide side; + + public ComboLeg() { + } + + public ComboLeg(Builder builder) { + this.productId = builder.productId; + this.quantity = builder.quantity; + this.side = builder.side; + } + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId; + } + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + public OrderSide getSide() { + return side; + } + + public void setSide(OrderSide side) { + this.side = side; + } + public static class Builder { + private String productId; + + private String quantity; + + private OrderSide side; + + public Builder productId(String productId) { + this.productId = productId; + return this; + } + + public Builder quantity(String quantity) { + this.quantity = quantity; + return this; + } + + public Builder side(OrderSide side) { + this.side = side; + return this; + } + + public ComboLeg build() { + return new ComboLeg(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/Commission.java b/src/main/java/com/coinbase/prime/model/Commission.java index 2e6ec812..f57238d6 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 dd68544c..b9b6d2cb 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 f26ae77e..6389647c 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 b55b319d..44f49208 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/ConversionFee.java b/src/main/java/com/coinbase/prime/model/ConversionFee.java new file mode 100644 index 00000000..959d1cac --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/ConversionFee.java @@ -0,0 +1,124 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.ConversionFeeTier; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Per-pair conversion fee row: month-to-date net conversion volume and + * the applicable progressive fee tiers for an organization. + */ +public class ConversionFee { + /** + * Source currency ticker. + */ + @JsonProperty("from_currency") + private String fromCurrency; + + /** + * Destination currency ticker. + */ + @JsonProperty("to_currency") + private String toCurrency; + + /** + * Month-to-date net conversion volume denominated in from_currency, aggregated at the owning organization level. Positive = net from->to, negative = net to->from. + */ + @JsonProperty("net_conversion_volume_mtd") + private String netConversionVolumeMtd; + + /** + * Progressive fee tiers applicable to this organization for this pair. Tiers are ordered from lowest to highest threshold. + */ + @JsonProperty("fee_tiers") + private List feeTiers; + + public ConversionFee() { + } + + public ConversionFee(Builder builder) { + this.fromCurrency = builder.fromCurrency; + this.toCurrency = builder.toCurrency; + this.netConversionVolumeMtd = builder.netConversionVolumeMtd; + this.feeTiers = builder.feeTiers; + } + public String getFromCurrency() { + return fromCurrency; + } + + public void setFromCurrency(String fromCurrency) { + this.fromCurrency = fromCurrency; + } + public String getToCurrency() { + return toCurrency; + } + + public void setToCurrency(String toCurrency) { + this.toCurrency = toCurrency; + } + public String getNetConversionVolumeMtd() { + return netConversionVolumeMtd; + } + + public void setNetConversionVolumeMtd(String netConversionVolumeMtd) { + this.netConversionVolumeMtd = netConversionVolumeMtd; + } + public List getFeeTiers() { + return feeTiers; + } + + public void setFeeTiers(List feeTiers) { + this.feeTiers = feeTiers; + } + public static class Builder { + private String fromCurrency; + + private String toCurrency; + + private String netConversionVolumeMtd; + + private List feeTiers; + + public Builder fromCurrency(String fromCurrency) { + this.fromCurrency = fromCurrency; + return this; + } + + public Builder toCurrency(String toCurrency) { + this.toCurrency = toCurrency; + return this; + } + + public Builder netConversionVolumeMtd(String netConversionVolumeMtd) { + this.netConversionVolumeMtd = netConversionVolumeMtd; + return this; + } + + public Builder feeTiers(List feeTiers) { + this.feeTiers = feeTiers; + return this; + } + + public ConversionFee build() { + return new ConversionFee(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/ConversionFeeTier.java b/src/main/java/com/coinbase/prime/model/ConversionFeeTier.java new file mode 100644 index 00000000..f4c30613 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/ConversionFeeTier.java @@ -0,0 +1,98 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A single fee tier in the progressive stablecoin conversion schedule. */ +public class ConversionFeeTier { + /** + * Inclusive lower bound for the tier in USD. + */ + @JsonProperty("min_threshold") + private String minThreshold; + + /** + * Exclusive upper bound for the tier in USD. Empty string for the highest, unbounded tier. + */ + @JsonProperty("max_threshold") + private String maxThreshold; + + /** + * Tier rate in basis points. + */ + @JsonProperty("rate_bps") + private String rateBps; + + public ConversionFeeTier() { + } + + public ConversionFeeTier(Builder builder) { + this.minThreshold = builder.minThreshold; + this.maxThreshold = builder.maxThreshold; + this.rateBps = builder.rateBps; + } + public String getMinThreshold() { + return minThreshold; + } + + public void setMinThreshold(String minThreshold) { + this.minThreshold = minThreshold; + } + public String getMaxThreshold() { + return maxThreshold; + } + + public void setMaxThreshold(String maxThreshold) { + this.maxThreshold = maxThreshold; + } + public String getRateBps() { + return rateBps; + } + + public void setRateBps(String rateBps) { + this.rateBps = rateBps; + } + public static class Builder { + private String minThreshold; + + private String maxThreshold; + + private String rateBps; + + public Builder minThreshold(String minThreshold) { + this.minThreshold = minThreshold; + return this; + } + + public Builder maxThreshold(String maxThreshold) { + this.maxThreshold = maxThreshold; + return this; + } + + public Builder rateBps(String rateBps) { + this.rateBps = rateBps; + return this; + } + + public ConversionFeeTier build() { + return new ConversionFeeTier(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/Counterparty.java b/src/main/java/com/coinbase/prime/model/Counterparty.java index 5aa627d8..c64b2d65 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 1d98213f..c32c5c89 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 41b9f63d..b20934dd 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 400fa72b..a513d8de 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 8727ef7f..b7f3e92e 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 bb84bcb0..8fbc2f75 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 4a7487fd..feef16f6 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 531628b4..5fab1bf9 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 f29a85ef..d246142e 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 69870079..9a8f9f07 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 6d73dde7..2db20d53 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/CustomStablecoinAsset.java b/src/main/java/com/coinbase/prime/model/CustomStablecoinAsset.java new file mode 100644 index 00000000..7e10e40d --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/CustomStablecoinAsset.java @@ -0,0 +1,54 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; + +/** Currency metadata of the custom stablecoin asset for the reward program */ +public class CustomStablecoinAsset { + /** + * The asset symbol (e.g. USDC, USDF) + */ + private String symbol; + + public CustomStablecoinAsset() { + } + + public CustomStablecoinAsset(Builder builder) { + this.symbol = builder.symbol; + } + public String getSymbol() { + return symbol; + } + + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public static class Builder { + private String symbol; + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public CustomStablecoinAsset build() { + return new CustomStablecoinAsset(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java b/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java index de3469a8..2f2bafa9 100644 --- a/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java +++ b/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java @@ -17,59 +17,80 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.CustomStablecoinAsset; 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() {} + /** Currency metadata of the custom stablecoin asset for the reward program */ + private CustomStablecoinAsset asset; - public CustomStablecoinRewardDetails(Builder builder) { - this.startDate = builder.startDate; - this.endDate = builder.endDate; - } + public CustomStablecoinRewardDetails() { + } - public String getStartDate() { - return startDate; - } + public CustomStablecoinRewardDetails(Builder builder) { + this.startDate = builder.startDate; + this.endDate = builder.endDate; + this.asset = builder.asset; + } + public String getStartDate() { + return startDate; + } - public void setStartDate(String startDate) { - this.startDate = startDate; - } + public void setStartDate(String startDate) { + this.startDate = startDate; + } + public String getEndDate() { + return endDate; + } - public String getEndDate() { - return endDate; - } + public void setEndDate(String endDate) { + this.endDate = endDate; + } + public CustomStablecoinAsset getAsset() { + return asset; + } - public void setEndDate(String endDate) { - this.endDate = endDate; - } + public void setAsset(CustomStablecoinAsset asset) { + this.asset = asset; + } + public static class Builder { + private String startDate; - public static class Builder { - private String startDate; + private String endDate; - private String endDate; + private CustomStablecoinAsset asset; - 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 Builder asset(CustomStablecoinAsset asset) { + this.asset = asset; + 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 9b65542b..c3da2d5e 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 bc53f3d2..c4baeb71 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/DerivativePosition.java b/src/main/java/com/coinbase/prime/model/DerivativePosition.java new file mode 100644 index 00000000..f650d2a4 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/DerivativePosition.java @@ -0,0 +1,294 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.enums.DerivativeProductType; +import com.coinbase.prime.model.enums.FcmPositionSide; +import com.coinbase.prime.model.OptionsDetails; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** A single derivative position across all derivative product types. */ +public class DerivativePosition { + /** + * 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; + + /** + * The general type of a derivative product. + * - DERIVATIVE_PRODUCT_TYPE_UNSPECIFIED: Unknown product type. + * - DERIVATIVE_PRODUCT_TYPE_SPOT: Spot product. + * - DERIVATIVE_PRODUCT_TYPE_FUTURE: Future product. + * - DERIVATIVE_PRODUCT_TYPE_EQUITY: Equity product. + * - DERIVATIVE_PRODUCT_TYPE_PREDICTION_MARKET: Prediction market product. + * - DERIVATIVE_PRODUCT_TYPE_OPTION: Option product. + * - DERIVATIVE_PRODUCT_TYPE_BASIS: Basis product. + * - DERIVATIVE_PRODUCT_TYPE_EQUITY_OPTION: Equity option product. + * - DERIVATIVE_PRODUCT_TYPE_FUTURE_COMBO: Future combo product. + * - DERIVATIVE_PRODUCT_TYPE_OPTION_COMBO: Option combo product. + */ + @JsonProperty("product_type") + private DerivativeProductType productType; + + /** + * Settlement currency + */ + private String currency; + + /** Options-specific details for a derivative position, including greeks. */ + @JsonProperty("options_details") + private OptionsDetails optionsDetails; + + /** + * Venue ID of the position + */ + @JsonProperty("venue_id") + private String venueId; + + public DerivativePosition() { + } + + public DerivativePosition(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; + this.productType = builder.productType; + this.currency = builder.currency; + this.optionsDetails = builder.optionsDetails; + this.venueId = builder.venueId; + } + 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 DerivativeProductType getProductType() { + return productType; + } + + public void setProductType(DerivativeProductType productType) { + this.productType = productType; + } + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + public OptionsDetails getOptionsDetails() { + return optionsDetails; + } + + public void setOptionsDetails(OptionsDetails optionsDetails) { + this.optionsDetails = optionsDetails; + } + public String getVenueId() { + return venueId; + } + + public void setVenueId(String venueId) { + this.venueId = venueId; + } + 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; + + private DerivativeProductType productType; + + private String currency; + + private OptionsDetails optionsDetails; + + private String venueId; + + 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 Builder productType(DerivativeProductType productType) { + this.productType = productType; + return this; + } + + public Builder currency(String currency) { + this.currency = currency; + return this; + } + + public Builder optionsDetails(OptionsDetails optionsDetails) { + this.optionsDetails = optionsDetails; + return this; + } + + public Builder venueId(String venueId) { + this.venueId = venueId; + return this; + } + + public DerivativePosition build() { + return new DerivativePosition(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/DerivativesCurrencyBalance.java b/src/main/java/com/coinbase/prime/model/DerivativesCurrencyBalance.java new file mode 100644 index 00000000..83c36c96 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/DerivativesCurrencyBalance.java @@ -0,0 +1,270 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.enums.FcmMarginHealthState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Balances for a single settlement currency within an international derivatives portfolio. */ +public class DerivativesCurrencyBalance { + /** + * Settlement currency + */ + private String currency; + + /** + * Cash balance for the currency + */ + private String balance; + + /** + * Unrealized PNL + */ + @JsonProperty("unrealized_pnl") + private String unrealizedPnl; + + /** + * Realized PNL + */ + @JsonProperty("realized_pnl") + private String realizedPnl; + + /** + * Initial margin + */ + @JsonProperty("initial_margin") + private String initialMargin; + + /** + * Maintenance margin + */ + @JsonProperty("maintenance_margin") + private String maintenanceMargin; + + /** + * Margin balance for the currency + */ + @JsonProperty("margin_balance") + private String marginBalance; + + /** + * Option value for the currency + */ + @JsonProperty("option_value") + private String optionValue; + + /** + * Margin excess for the currency (negative indicates a margin deficit) + */ + @JsonProperty("margin_excess") + private String marginExcess; + + /** + * Margin utilization for the currency, as a percentage + */ + @JsonProperty("margin_utilization") + private String marginUtilization; + + /** + * 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. + */ + @JsonProperty("margin_health_state") + private FcmMarginHealthState marginHealthState; + + public DerivativesCurrencyBalance() { + } + + public DerivativesCurrencyBalance(Builder builder) { + this.currency = builder.currency; + this.balance = builder.balance; + this.unrealizedPnl = builder.unrealizedPnl; + this.realizedPnl = builder.realizedPnl; + this.initialMargin = builder.initialMargin; + this.maintenanceMargin = builder.maintenanceMargin; + this.marginBalance = builder.marginBalance; + this.optionValue = builder.optionValue; + this.marginExcess = builder.marginExcess; + this.marginUtilization = builder.marginUtilization; + this.marginHealthState = builder.marginHealthState; + } + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + public String getBalance() { + return balance; + } + + public void setBalance(String balance) { + this.balance = balance; + } + 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 getInitialMargin() { + return initialMargin; + } + + public void setInitialMargin(String initialMargin) { + this.initialMargin = initialMargin; + } + public String getMaintenanceMargin() { + return maintenanceMargin; + } + + public void setMaintenanceMargin(String maintenanceMargin) { + this.maintenanceMargin = maintenanceMargin; + } + public String getMarginBalance() { + return marginBalance; + } + + public void setMarginBalance(String marginBalance) { + this.marginBalance = marginBalance; + } + public String getOptionValue() { + return optionValue; + } + + public void setOptionValue(String optionValue) { + this.optionValue = optionValue; + } + public String getMarginExcess() { + return marginExcess; + } + + public void setMarginExcess(String marginExcess) { + this.marginExcess = marginExcess; + } + public String getMarginUtilization() { + return marginUtilization; + } + + public void setMarginUtilization(String marginUtilization) { + this.marginUtilization = marginUtilization; + } + public FcmMarginHealthState getMarginHealthState() { + return marginHealthState; + } + + public void setMarginHealthState(FcmMarginHealthState marginHealthState) { + this.marginHealthState = marginHealthState; + } + public static class Builder { + private String currency; + + private String balance; + + private String unrealizedPnl; + + private String realizedPnl; + + private String initialMargin; + + private String maintenanceMargin; + + private String marginBalance; + + private String optionValue; + + private String marginExcess; + + private String marginUtilization; + + private FcmMarginHealthState marginHealthState; + + public Builder currency(String currency) { + this.currency = currency; + return this; + } + + public Builder balance(String balance) { + this.balance = balance; + return this; + } + + public Builder unrealizedPnl(String unrealizedPnl) { + this.unrealizedPnl = unrealizedPnl; + return this; + } + + public Builder realizedPnl(String realizedPnl) { + this.realizedPnl = realizedPnl; + return this; + } + + public Builder initialMargin(String initialMargin) { + this.initialMargin = initialMargin; + return this; + } + + public Builder maintenanceMargin(String maintenanceMargin) { + this.maintenanceMargin = maintenanceMargin; + return this; + } + + public Builder marginBalance(String marginBalance) { + this.marginBalance = marginBalance; + return this; + } + + public Builder optionValue(String optionValue) { + this.optionValue = optionValue; + return this; + } + + public Builder marginExcess(String marginExcess) { + this.marginExcess = marginExcess; + return this; + } + + public Builder marginUtilization(String marginUtilization) { + this.marginUtilization = marginUtilization; + return this; + } + + public Builder marginHealthState(FcmMarginHealthState marginHealthState) { + this.marginHealthState = marginHealthState; + return this; + } + + public DerivativesCurrencyBalance build() { + return new DerivativesCurrencyBalance(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/DestinationAlloc.java b/src/main/java/com/coinbase/prime/model/DestinationAlloc.java index 59fc8035..11eacdcc 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 9627d47e..6ef150b2 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 db14b2da..d2fb74f9 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 ad0fd08f..ceb692a0 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 2e97ec79..c6422d8c 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 cff61ee7..fbef7eaa 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 de7c4013..486270e9 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 c8a65d39..758af2bf 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 a727e2ec..696588e8 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 f3ea0a3a..cfa33e98 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 c00b686a..9edaba2f 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 adf59b81..a90e7e88 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 5a000cfa..64c39e0b 100644 --- a/src/main/java/com/coinbase/prime/model/Fill.java +++ b/src/main/java/com/coinbase/prime/model/Fill.java @@ -17,314 +17,333 @@ */ 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 + * - OPTION: Option 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 fa7f62d8..4cee772d 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 28bc4b36..96c3e0b8 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 c5ddc694..3f07869f 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 95598d6b..c666a2c6 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 780c6dd9..286f0a72 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 d22753e6..47b85d65 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 8a30363c..2d91acd1 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 be312b26..e6cba3c2 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 d0c49cd6..4d320be6 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 3c87f9fc..ee529849 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 5eca7110..625c2f06 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 7da17538..d4145735 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 c8001498..f59508ae 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 640acf94..2ace5093 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 afe822c4..44491e1d 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 90d3e6b5..4ab0fbb8 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 aa3dd350..7e72428c 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 6a46f4cf..aafba594 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 d57d361b..5ca5a6c2 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 6507fa6f..67bf05bc 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 8fa3b1be..4bc0b2ed 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 bee92700..d2bdfd67 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 3a37efb5..c764f5f3 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 c3896a83..22c8ae1a 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 23df0787..a49114ac 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/OptionProductDetails.java b/src/main/java/com/coinbase/prime/model/OptionProductDetails.java new file mode 100644 index 00000000..33895a37 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/OptionProductDetails.java @@ -0,0 +1,322 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.enums.OptionType; +import com.coinbase.prime.model.PriceIncrementStep; +import com.coinbase.prime.model.enums.SettlementModel; +import com.coinbase.prime.model.enums.SettlementPeriod; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** OptionProductDetails contains details specific to option products */ +public class OptionProductDetails { + /** + * The type of an option position. + * - OPTION_TYPE_UNSPECIFIED: Unspecified option type. + * - OPTION_TYPE_CALL: Call option. + * - OPTION_TYPE_PUT: Put option. + */ + @JsonProperty("option_type") + private OptionType optionType; + + /** + * Strike price of the option + */ + private String strike; + + /** + * Contract root unit (underlying asset) + */ + @JsonProperty("contract_root_unit") + private String contractRootUnit; + + /** + * Currency the option settles in + */ + @JsonProperty("settlement_currency") + private String settlementCurrency; + + /** + * Contract code identifier + */ + @JsonProperty("contract_code") + private String contractCode; + + /** + * Descriptive name for the product group + */ + @JsonProperty("group_description") + private String groupDescription; + + /** + * Contract size + */ + @JsonProperty("contract_size") + private String contractSize; + + /** + * Contract expiry timestamp + */ + @JsonProperty("contract_expiry") + private OffsetDateTime contractExpiry; + + /** + * - SETTLEMENT_PERIOD_UNSPECIFIED: Unspecified settlement period + * - SETTLEMENT_PERIOD_PERPETUAL: Contract never expires + * - SETTLEMENT_PERIOD_DAY: Contract expires daily + * - SETTLEMENT_PERIOD_WEEK: Contract expires weekly + * - SETTLEMENT_PERIOD_MONTH: Contract expires monthly + */ + @JsonProperty("settlement_period") + private SettlementPeriod settlementPeriod; + + /** + * - SETTLEMENT_MODEL_UNSPECIFIED: Unspecified settlement model + * - SETTLEMENT_MODEL_LINEAR: Settles in the quote currency + * - SETTLEMENT_MODEL_INVERSE: Settles in the base currency + */ + @JsonProperty("settlement_model") + private SettlementModel settlementModel; + + /** + * Currency the option is quoted against + */ + @JsonProperty("counter_currency") + private String counterCurrency; + + /** + * Smallest tradable quantity of the contract + */ + @JsonProperty("lot_size") + private String lotSize; + + /** + * Tiered price increments that override price_increment above a threshold; empty when a single price_increment applies + */ + @JsonProperty("price_increment_steps") + private List priceIncrementSteps; + + public OptionProductDetails() { + } + + public OptionProductDetails(Builder builder) { + this.optionType = builder.optionType; + this.strike = builder.strike; + this.contractRootUnit = builder.contractRootUnit; + this.settlementCurrency = builder.settlementCurrency; + this.contractCode = builder.contractCode; + this.groupDescription = builder.groupDescription; + this.contractSize = builder.contractSize; + this.contractExpiry = builder.contractExpiry; + this.settlementPeriod = builder.settlementPeriod; + this.settlementModel = builder.settlementModel; + this.counterCurrency = builder.counterCurrency; + this.lotSize = builder.lotSize; + this.priceIncrementSteps = builder.priceIncrementSteps; + } + public OptionType getOptionType() { + return optionType; + } + + public void setOptionType(OptionType optionType) { + this.optionType = optionType; + } + public String getStrike() { + return strike; + } + + public void setStrike(String strike) { + this.strike = strike; + } + public String getContractRootUnit() { + return contractRootUnit; + } + + public void setContractRootUnit(String contractRootUnit) { + this.contractRootUnit = contractRootUnit; + } + public String getSettlementCurrency() { + return settlementCurrency; + } + + public void setSettlementCurrency(String settlementCurrency) { + this.settlementCurrency = settlementCurrency; + } + public String getContractCode() { + return contractCode; + } + + public void setContractCode(String contractCode) { + this.contractCode = contractCode; + } + public String getGroupDescription() { + return groupDescription; + } + + public void setGroupDescription(String groupDescription) { + this.groupDescription = groupDescription; + } + 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 SettlementPeriod getSettlementPeriod() { + return settlementPeriod; + } + + public void setSettlementPeriod(SettlementPeriod settlementPeriod) { + this.settlementPeriod = settlementPeriod; + } + public SettlementModel getSettlementModel() { + return settlementModel; + } + + public void setSettlementModel(SettlementModel settlementModel) { + this.settlementModel = settlementModel; + } + public String getCounterCurrency() { + return counterCurrency; + } + + public void setCounterCurrency(String counterCurrency) { + this.counterCurrency = counterCurrency; + } + public String getLotSize() { + return lotSize; + } + + public void setLotSize(String lotSize) { + this.lotSize = lotSize; + } + public List getPriceIncrementSteps() { + return priceIncrementSteps; + } + + public void setPriceIncrementSteps(List priceIncrementSteps) { + this.priceIncrementSteps = priceIncrementSteps; + } + public static class Builder { + private OptionType optionType; + + private String strike; + + private String contractRootUnit; + + private String settlementCurrency; + + private String contractCode; + + private String groupDescription; + + private String contractSize; + + private OffsetDateTime contractExpiry; + + private SettlementPeriod settlementPeriod; + + private SettlementModel settlementModel; + + private String counterCurrency; + + private String lotSize; + + private List priceIncrementSteps; + + public Builder optionType(OptionType optionType) { + this.optionType = optionType; + return this; + } + + public Builder strike(String strike) { + this.strike = strike; + return this; + } + + public Builder contractRootUnit(String contractRootUnit) { + this.contractRootUnit = contractRootUnit; + return this; + } + + public Builder settlementCurrency(String settlementCurrency) { + this.settlementCurrency = settlementCurrency; + return this; + } + + public Builder contractCode(String contractCode) { + this.contractCode = contractCode; + return this; + } + + public Builder groupDescription(String groupDescription) { + this.groupDescription = groupDescription; + return this; + } + + public Builder contractSize(String contractSize) { + this.contractSize = contractSize; + return this; + } + + public Builder contractExpiry(OffsetDateTime contractExpiry) { + this.contractExpiry = contractExpiry; + return this; + } + + public Builder settlementPeriod(SettlementPeriod settlementPeriod) { + this.settlementPeriod = settlementPeriod; + return this; + } + + public Builder settlementModel(SettlementModel settlementModel) { + this.settlementModel = settlementModel; + return this; + } + + public Builder counterCurrency(String counterCurrency) { + this.counterCurrency = counterCurrency; + return this; + } + + public Builder lotSize(String lotSize) { + this.lotSize = lotSize; + return this; + } + + public Builder priceIncrementSteps(List priceIncrementSteps) { + this.priceIncrementSteps = priceIncrementSteps; + return this; + } + + public OptionProductDetails build() { + return new OptionProductDetails(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/OptionsDetails.java b/src/main/java/com/coinbase/prime/model/OptionsDetails.java new file mode 100644 index 00000000..f7fac884 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/OptionsDetails.java @@ -0,0 +1,160 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.enums.OptionType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Options-specific details for a derivative position, including greeks. */ +public class OptionsDetails { + /** + * Delta greek + */ + private String delta; + + /** + * Gamma greek + */ + private String gamma; + + /** + * Theta greek + */ + private String theta; + + /** + * Vega greek + */ + private String vega; + + /** + * Strike price + */ + private String strike; + + /** + * The type of an option position. + * - OPTION_TYPE_UNSPECIFIED: Unspecified option type. + * - OPTION_TYPE_CALL: Call option. + * - OPTION_TYPE_PUT: Put option. + */ + @JsonProperty("option_type") + private OptionType optionType; + + public OptionsDetails() { + } + + public OptionsDetails(Builder builder) { + this.delta = builder.delta; + this.gamma = builder.gamma; + this.theta = builder.theta; + this.vega = builder.vega; + this.strike = builder.strike; + this.optionType = builder.optionType; + } + public String getDelta() { + return delta; + } + + public void setDelta(String delta) { + this.delta = delta; + } + public String getGamma() { + return gamma; + } + + public void setGamma(String gamma) { + this.gamma = gamma; + } + public String getTheta() { + return theta; + } + + public void setTheta(String theta) { + this.theta = theta; + } + public String getVega() { + return vega; + } + + public void setVega(String vega) { + this.vega = vega; + } + public String getStrike() { + return strike; + } + + public void setStrike(String strike) { + this.strike = strike; + } + public OptionType getOptionType() { + return optionType; + } + + public void setOptionType(OptionType optionType) { + this.optionType = optionType; + } + public static class Builder { + private String delta; + + private String gamma; + + private String theta; + + private String vega; + + private String strike; + + private OptionType optionType; + + public Builder delta(String delta) { + this.delta = delta; + return this; + } + + public Builder gamma(String gamma) { + this.gamma = gamma; + return this; + } + + public Builder theta(String theta) { + this.theta = theta; + return this; + } + + public Builder vega(String vega) { + this.vega = vega; + return this; + } + + public Builder strike(String strike) { + this.strike = strike; + return this; + } + + public Builder optionType(OptionType optionType) { + this.optionType = optionType; + return this; + } + + public OptionsDetails build() { + return new OptionsDetails(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/Order.java b/src/main/java/com/coinbase/prime/model/Order.java index eeb2673e..b9ad96cc 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,827 @@ 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 + * - OPTION: Option product + */ + @JsonProperty("product_type") private ProductType productType; + @JsonProperty("commission_detail_total") private CommissionDetailTotal commissionDetailTotal; - public Builder id(String id) { - this.id = id; - return this; + /** + * Indicates if this was a buy exact order (fees charged on top of quote size for BUY orders sized in quote) + */ + @JsonProperty("is_buy_exact") + private boolean isBuyExact; + + public Order() { } - public Builder userId(String userId) { - this.userId = userId; - return this; + 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; + this.isBuyExact = builder.isBuyExact; + } + 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 getUserId() { + return userId; } - public Builder productId(String productId) { - this.productId = productId; - return this; + public void setUserId(String userId) { + this.userId = userId; + } + public String getPortfolioId() { + return portfolioId; } - public Builder side(OrderSide side) { - this.side = side; - return this; + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public String getProductId() { + return productId; } - public Builder clientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; - return this; + public void setProductId(String productId) { + this.productId = productId; + } + public OrderSide getSide() { + return side; } - public Builder type(OrderType type) { - this.type = type; - return this; + public void setSide(OrderSide side) { + this.side = side; + } + public String getClientOrderId() { + return clientOrderId; } - public Builder baseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - return this; + public void setClientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; + } + public OrderType getType() { + return type; } - public Builder quoteValue(String quoteValue) { - this.quoteValue = quoteValue; - return this; + public void setType(OrderType type) { + this.type = type; + } + public String getBaseQuantity() { + return baseQuantity; } - public Builder limitPrice(String limitPrice) { - this.limitPrice = limitPrice; - return this; + public void setBaseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + } + public String getQuoteValue() { + return quoteValue; } - public Builder startTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; + public void setQuoteValue(String quoteValue) { + this.quoteValue = quoteValue; + } + public String getLimitPrice() { + return limitPrice; } - public Builder expiryTime(OffsetDateTime expiryTime) { - this.expiryTime = expiryTime; - return this; + public void setLimitPrice(String limitPrice) { + this.limitPrice = limitPrice; + } + public OffsetDateTime getStartTime() { + return startTime; } - public Builder status(OrderStatus status) { - this.status = status; - return this; + public void setStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + } + public OffsetDateTime getExpiryTime() { + return expiryTime; } - public Builder timeInForce(TimeInForceType timeInForce) { - this.timeInForce = timeInForce; - return this; + public void setExpiryTime(OffsetDateTime expiryTime) { + this.expiryTime = expiryTime; + } + public OrderStatus getStatus() { + return status; } - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; + public void setStatus(OrderStatus status) { + this.status = status; + } + public TimeInForceType getTimeInForce() { + return timeInForce; } - public Builder filledQuantity(String filledQuantity) { - this.filledQuantity = filledQuantity; - return this; + public void setTimeInForce(TimeInForceType timeInForce) { + this.timeInForce = timeInForce; + } + public OffsetDateTime getCreatedAt() { + return createdAt; } - public Builder filledValue(String filledValue) { - this.filledValue = filledValue; - return this; + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + public String getFilledQuantity() { + return filledQuantity; } - public Builder averageFilledPrice(String averageFilledPrice) { - this.averageFilledPrice = averageFilledPrice; - return this; + public void setFilledQuantity(String filledQuantity) { + this.filledQuantity = filledQuantity; + } + public String getFilledValue() { + return filledValue; } - public Builder commission(String commission) { - this.commission = commission; - return this; + public void setFilledValue(String filledValue) { + this.filledValue = filledValue; + } + public String getAverageFilledPrice() { + return averageFilledPrice; } - public Builder exchangeFee(String exchangeFee) { - this.exchangeFee = exchangeFee; - return this; + public void setAverageFilledPrice(String averageFilledPrice) { + this.averageFilledPrice = averageFilledPrice; + } + public String getCommission() { + return commission; } - public Builder historicalPov(String historicalPov) { - this.historicalPov = historicalPov; - return this; + public void setCommission(String commission) { + this.commission = commission; + } + public String getExchangeFee() { + return exchangeFee; } - public Builder stopPrice(String stopPrice) { - this.stopPrice = stopPrice; - return this; + public void setExchangeFee(String exchangeFee) { + this.exchangeFee = exchangeFee; + } + public String getHistoricalPov() { + return historicalPov; } - public Builder netAverageFilledPrice(String netAverageFilledPrice) { - this.netAverageFilledPrice = netAverageFilledPrice; - return this; + public void setHistoricalPov(String historicalPov) { + this.historicalPov = historicalPov; + } + public String getStopPrice() { + return stopPrice; } - public Builder userContext(String userContext) { - this.userContext = userContext; - return this; + public void setStopPrice(String stopPrice) { + this.stopPrice = stopPrice; + } + public String getNetAverageFilledPrice() { + return netAverageFilledPrice; } - public Builder clientProductId(String clientProductId) { - this.clientProductId = clientProductId; - return this; + public void setNetAverageFilledPrice(String netAverageFilledPrice) { + this.netAverageFilledPrice = netAverageFilledPrice; + } + public String getUserContext() { + return userContext; } - public Builder postOnly(boolean postOnly) { - this.postOnly = postOnly; - return this; + public void setUserContext(String userContext) { + this.userContext = userContext; + } + public String getClientProductId() { + return clientProductId; } - public Builder orderEditHistory(List orderEditHistory) { - this.orderEditHistory = orderEditHistory; - return this; + public void setClientProductId(String clientProductId) { + this.clientProductId = clientProductId; + } + public boolean getPostOnly() { + return postOnly; } - public Builder isRaiseExact(boolean isRaiseExact) { - this.isRaiseExact = isRaiseExact; - return this; + public void setPostOnly(boolean postOnly) { + this.postOnly = postOnly; + } + public List getOrderEditHistory() { + return orderEditHistory; } - public Builder displaySize(String displaySize) { - this.displaySize = displaySize; - return this; + public void setOrderEditHistory(List orderEditHistory) { + this.orderEditHistory = orderEditHistory; + } + public boolean getIsRaiseExact() { + return isRaiseExact; } - public Builder editHistory(List editHistory) { - this.editHistory = editHistory; - return this; + public void setIsRaiseExact(boolean isRaiseExact) { + this.isRaiseExact = isRaiseExact; + } + public String getDisplaySize() { + return displaySize; } - public Builder displayQuoteSize(String displayQuoteSize) { - this.displayQuoteSize = displayQuoteSize; - return this; + public void setDisplaySize(String displaySize) { + this.displaySize = displaySize; + } + public List getEditHistory() { + return editHistory; } - public Builder displayBaseSize(String displayBaseSize) { - this.displayBaseSize = displayBaseSize; - return this; + public void setEditHistory(List editHistory) { + this.editHistory = editHistory; + } + public String getDisplayQuoteSize() { + return displayQuoteSize; } - public Builder pegOffsetType(String pegOffsetType) { - this.pegOffsetType = pegOffsetType; - return this; + public void setDisplayQuoteSize(String displayQuoteSize) { + this.displayQuoteSize = displayQuoteSize; + } + public String getDisplayBaseSize() { + return displayBaseSize; } - public Builder offset(String offset) { - this.offset = offset; - return this; + public void setDisplayBaseSize(String displayBaseSize) { + this.displayBaseSize = displayBaseSize; + } + public String getPegOffsetType() { + return pegOffsetType; } - public Builder wigLevel(String wigLevel) { - this.wigLevel = wigLevel; - return this; + 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 Builder productType(ProductType productType) { - this.productType = productType; - return this; + 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 Builder commissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { - this.commissionDetailTotal = commissionDetailTotal; - return this; + public void setCommissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; } + public boolean getIsBuyExact() { + return isBuyExact; + } + + public void setIsBuyExact(boolean isBuyExact) { + this.isBuyExact = isBuyExact; + } + 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; + + private boolean isBuyExact; + + 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 Builder isBuyExact(boolean isBuyExact) { + this.isBuyExact = isBuyExact; + 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 d5a6af5b..99c5a6fd 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 d5c70009..c174f0e1 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 7c12fac8..0ffad5e7 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 1e76f859..77626dc2 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 a196bd62..eb281521 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 7c9bad68..96e9c1c5 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 c5a9c8f0..aced61a3 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 44c43eb0..1798796a 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 8ad0a2ea..2cc951b9 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 573a8152..31594cdc 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 c3baac46..dd15ee1b 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 29ae30f2..dc61b956 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/PriceIncrementStep.java b/src/main/java/com/coinbase/prime/model/PriceIncrementStep.java new file mode 100644 index 00000000..5eb4e2a3 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/PriceIncrementStep.java @@ -0,0 +1,81 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * PriceIncrementStep overrides the product's price_increment for prices above a + * threshold. A price takes the increment of the highest step whose threshold it + * strictly exceeds, and the product's price_increment when it exceeds none. + */ +public class PriceIncrementStep { + /** + * Prices strictly greater than this threshold use this step's price increment; a price equal to it takes the next lower step + */ + @JsonProperty("price_threshold") + private String priceThreshold; + + /** + * Minimum price increment applied to prices above the threshold + */ + @JsonProperty("price_increment") + private String priceIncrement; + + public PriceIncrementStep() { + } + + public PriceIncrementStep(Builder builder) { + this.priceThreshold = builder.priceThreshold; + this.priceIncrement = builder.priceIncrement; + } + public String getPriceThreshold() { + return priceThreshold; + } + + public void setPriceThreshold(String priceThreshold) { + this.priceThreshold = priceThreshold; + } + public String getPriceIncrement() { + return priceIncrement; + } + + public void setPriceIncrement(String priceIncrement) { + this.priceIncrement = priceIncrement; + } + public static class Builder { + private String priceThreshold; + + private String priceIncrement; + + public Builder priceThreshold(String priceThreshold) { + this.priceThreshold = priceThreshold; + return this; + } + + public Builder priceIncrement(String priceIncrement) { + this.priceIncrement = priceIncrement; + return this; + } + + public PriceIncrementStep build() { + return new PriceIncrementStep(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java b/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java index d13b04c0..f0014b3f 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 9a0202c5..518b8a80 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 afc3a5c2..f4315fcf 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 55a2f2bd..0d483d24 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 2021ef7c..81cd835e 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 a6a9fde4..ac4650ec 100644 --- a/src/main/java/com/coinbase/prime/model/Product.java +++ b/src/main/java/com/coinbase/prime/model/Product.java @@ -17,278 +17,311 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.FcmTradingSessionDetails; +import com.coinbase.prime.model.FutureProductDetails; +import com.coinbase.prime.model.OptionProductDetails; 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 + * - OPTION: Option 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; + /** OptionProductDetails contains details specific to option products */ + @JsonProperty("option_product_details") + private OptionProductDetails optionProductDetails; + + public Product() { } - public Builder baseIncrement(String baseIncrement) { - this.baseIncrement = baseIncrement; - return this; + 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; + this.optionProductDetails = builder.optionProductDetails; + } + public String getId() { + return id; } - public Builder quoteIncrement(String quoteIncrement) { - this.quoteIncrement = quoteIncrement; - return this; + public void setId(String id) { + this.id = id; + } + public String getBaseIncrement() { + return baseIncrement; } - public Builder baseMinSize(String baseMinSize) { - this.baseMinSize = baseMinSize; - return this; + public void setBaseIncrement(String baseIncrement) { + this.baseIncrement = baseIncrement; + } + public String getQuoteIncrement() { + return quoteIncrement; } - public Builder quoteMinSize(String quoteMinSize) { - this.quoteMinSize = quoteMinSize; - return this; + public void setQuoteIncrement(String quoteIncrement) { + this.quoteIncrement = quoteIncrement; + } + public String getBaseMinSize() { + return baseMinSize; } - public Builder baseMaxSize(String baseMaxSize) { - this.baseMaxSize = baseMaxSize; - return this; + public void setBaseMinSize(String baseMinSize) { + this.baseMinSize = baseMinSize; + } + public String getQuoteMinSize() { + return quoteMinSize; } - public Builder quoteMaxSize(String quoteMaxSize) { - this.quoteMaxSize = quoteMaxSize; - return this; + public void setQuoteMinSize(String quoteMinSize) { + this.quoteMinSize = quoteMinSize; + } + public String getBaseMaxSize() { + return baseMaxSize; } - public Builder permissions(List permissions) { - this.permissions = permissions; - return this; + public void setBaseMaxSize(String baseMaxSize) { + this.baseMaxSize = baseMaxSize; + } + public String getQuoteMaxSize() { + return quoteMaxSize; } - public Builder priceIncrement(String priceIncrement) { - this.priceIncrement = priceIncrement; - return this; + public void setQuoteMaxSize(String quoteMaxSize) { + this.quoteMaxSize = quoteMaxSize; + } + public List getPermissions() { + return permissions; } - public Builder rfqProductDetails(RfqProductDetails rfqProductDetails) { - this.rfqProductDetails = rfqProductDetails; - return this; + public void setPermissions(List permissions) { + this.permissions = permissions; + } + public String getPriceIncrement() { + return priceIncrement; } - public Builder productType(ProductType productType) { - this.productType = productType; - return this; + public void setPriceIncrement(String priceIncrement) { + this.priceIncrement = priceIncrement; + } + public RfqProductDetails getRfqProductDetails() { + return rfqProductDetails; } - public Builder fcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { - this.fcmTradingSessionDetails = fcmTradingSessionDetails; - return this; + public void setRfqProductDetails(RfqProductDetails rfqProductDetails) { + this.rfqProductDetails = rfqProductDetails; + } + public ProductType getProductType() { + return productType; } - public Builder futureProductDetails(FutureProductDetails futureProductDetails) { - this.futureProductDetails = futureProductDetails; - return this; + public void setProductType(ProductType productType) { + this.productType = productType; + } + public FcmTradingSessionDetails getFcmTradingSessionDetails() { + return fcmTradingSessionDetails; } - public Product build() { - return new Product(this); + public void setFcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { + this.fcmTradingSessionDetails = fcmTradingSessionDetails; + } + public FutureProductDetails getFutureProductDetails() { + return futureProductDetails; + } + + public void setFutureProductDetails(FutureProductDetails futureProductDetails) { + this.futureProductDetails = futureProductDetails; + } + public OptionProductDetails getOptionProductDetails() { + return optionProductDetails; + } + + public void setOptionProductDetails(OptionProductDetails optionProductDetails) { + this.optionProductDetails = optionProductDetails; + } + 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; + + private OptionProductDetails optionProductDetails; + + 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 Builder optionProductDetails(OptionProductDetails optionProductDetails) { + this.optionProductDetails = optionProductDetails; + 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 1663fcc6..6f8ec0a9 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 c5dc33a9..95f2ee70 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 b164c2af..78ae8c3a 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 47796996..fc50261a 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 a8292492..f320bc0c 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 4ac65a6f..d8641f13 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 9b0fff83..3ed54518 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 9616df69..1d9b87b0 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 2cd8de5d..507aafe1 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 4ccb1c48..73fa8723 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 eb33282a..e18b0f46 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 f8ad16ac..7ea73876 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 01d8cd4d..26abf3c0 100644 --- a/src/main/java/com/coinbase/prime/model/Transaction.java +++ b/src/main/java/com/coinbase/prime/model/Transaction.java @@ -17,567 +17,605 @@ */ 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 + * - MERGE_STAKE: On-chain transaction consolidating funds from different addresses belonging to the same wallet. + */ 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 d132085c..46d2ced4 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 93d2354b..fa75726e 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 5bcea1a2..59d11ae9 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 6a7b8e77..5ace1a6c 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 b401be31..bb0a9912 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java @@ -17,231 +17,250 @@ */ 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; + /** Detailed address information */ + @JsonProperty("vasp_address") + private DetailedAddress vaspAddress; + + 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; + this.vaspAddress = builder.vaspAddress; + } + 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 Builder personalId(String personalId) { - this.personalId = personalId; - return this; + public void setVaspId(String vaspId) { + this.vaspId = vaspId; + } + public String getVaspName() { + return vaspName; } - public Builder dateOfBirth(DateOfBirth dateOfBirth) { - this.dateOfBirth = dateOfBirth; - return this; + public void setVaspName(String vaspName) { + this.vaspName = vaspName; + } + public String getPersonalId() { + return personalId; } - public Builder telephoneNumber(String telephoneNumber) { - this.telephoneNumber = telephoneNumber; - return this; + public void setPersonalId(String personalId) { + this.personalId = personalId; + } + public DateOfBirth getDateOfBirth() { + return dateOfBirth; } - public Builder accountId(String accountId) { - this.accountId = accountId; - return this; + public void setDateOfBirth(DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + public String getTelephoneNumber() { + return telephoneNumber; } - public TravelRuleParty build() { - return new TravelRuleParty(this); + public void setTelephoneNumber(String telephoneNumber) { + this.telephoneNumber = telephoneNumber; + } + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + public DetailedAddress getVaspAddress() { + return vaspAddress; + } + + public void setVaspAddress(DetailedAddress vaspAddress) { + this.vaspAddress = vaspAddress; + } + 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; + + private DetailedAddress vaspAddress; + + 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 Builder vaspAddress(DetailedAddress vaspAddress) { + this.vaspAddress = vaspAddress; + 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 e73f531f..b948ca74 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 1df1943e..e86fbeda 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 3c488fe0..f0d68e13 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 448437df..7540329e 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 982a0d15..f610b1c2 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 7a2698c1..074da634 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 3cb886e7..e0ec10f9 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 91898d12..8919998d 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 59916531..71f7ec11 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 5b8e011f..6ca843cc 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 58b080ac..df11453f 100644 --- a/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java @@ -17,67 +17,84 @@ */ 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; - } - - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - - public String getValidatorAddress() { - return validatorAddress; - } - - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } - - public static class Builder { + /** + * 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 Builder amount(String amount) { - this.amount = amount; - return this; + /** + * Optional delegation end date in ISO date format (e.g. 2026-07-15). Required for AVAX; minimum 14-day delegation period applies. + */ + @JsonProperty("end_date") + private String endDate; + + public WalletStakeInputs() { + } + + public WalletStakeInputs(Builder builder) { + this.amount = builder.amount; + this.validatorAddress = builder.validatorAddress; + this.endDate = builder.endDate; + } + public String getAmount() { + return amount; } - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; + public void setAmount(String amount) { + this.amount = amount; + } + public String getValidatorAddress() { + return validatorAddress; + } + + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } + public String getEndDate() { + return endDate; } - public WalletStakeInputs build() { - return new WalletStakeInputs(this); + public void setEndDate(String endDate) { + this.endDate = endDate; + } + public static class Builder { + private String amount; + + private String validatorAddress; + + private String endDate; + + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; + } + + public Builder endDate(String endDate) { + this.endDate = endDate; + 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 f7037786..da001ba3 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 4817ca73..ec17686d 100644 --- a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java @@ -17,69 +17,86 @@ */ 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; - } - - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - - public List getValidatorAllocations() { - return validatorAllocations; - } - - public void setValidatorAllocations(List validatorAllocations) { - this.validatorAllocations = validatorAllocations; - } - - public static class Builder { + /** + * 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 Builder amount(String amount) { - this.amount = amount; - return this; + /** + * Optional validator address to unstake from. Only supported for a subset of protocols. + */ + @JsonProperty("validator_address") + private String validatorAddress; + + public WalletUnstakeInputs() { + } + + public WalletUnstakeInputs(Builder builder) { + this.amount = builder.amount; + this.validatorAllocations = builder.validatorAllocations; + this.validatorAddress = builder.validatorAddress; + } + public String getAmount() { + return amount; } - public Builder validatorAllocations(List validatorAllocations) { - this.validatorAllocations = validatorAllocations; - return this; + public void setAmount(String amount) { + this.amount = amount; + } + public List getValidatorAllocations() { + return validatorAllocations; + } + + public void setValidatorAllocations(List validatorAllocations) { + this.validatorAllocations = validatorAllocations; + } + public String getValidatorAddress() { + return validatorAddress; } - public WalletUnstakeInputs build() { - return new WalletUnstakeInputs(this); + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } + public static class Builder { + private String amount; + + private List validatorAllocations; + + private String validatorAddress; + + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public Builder validatorAllocations(List validatorAllocations) { + this.validatorAllocations = validatorAllocations; + return this; + } + + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + 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 532669d2..cd1950e1 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/XMLiquidatedAsset.java b/src/main/java/com/coinbase/prime/model/XMLiquidatedAsset.java new file mode 100644 index 00000000..2e99c137 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/XMLiquidatedAsset.java @@ -0,0 +1,139 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** XMLiquidatedAsset provides per-asset detail for a liquidation */ +public class XMLiquidatedAsset { + /** + * Asset currency + */ + private String asset; + + /** + * Amount (nominal) of the asset that has been liquidated + */ + @JsonProperty("liquidated_amount") + private String liquidatedAmount; + + /** + * USD notional value of the liquidated amount + */ + @JsonProperty("liquidated_notional") + private String liquidatedNotional; + + /** + * Amount (nominal) of the asset remaining to be liquidated + */ + @JsonProperty("remaining_amount") + private String remainingAmount; + + /** + * USD notional value of the remaining amount + */ + @JsonProperty("remaining_notional") + private String remainingNotional; + + public XMLiquidatedAsset() { + } + + public XMLiquidatedAsset(Builder builder) { + this.asset = builder.asset; + this.liquidatedAmount = builder.liquidatedAmount; + this.liquidatedNotional = builder.liquidatedNotional; + this.remainingAmount = builder.remainingAmount; + this.remainingNotional = builder.remainingNotional; + } + public String getAsset() { + return asset; + } + + public void setAsset(String asset) { + this.asset = asset; + } + public String getLiquidatedAmount() { + return liquidatedAmount; + } + + public void setLiquidatedAmount(String liquidatedAmount) { + this.liquidatedAmount = liquidatedAmount; + } + public String getLiquidatedNotional() { + return liquidatedNotional; + } + + public void setLiquidatedNotional(String liquidatedNotional) { + this.liquidatedNotional = liquidatedNotional; + } + public String getRemainingAmount() { + return remainingAmount; + } + + public void setRemainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + } + public String getRemainingNotional() { + return remainingNotional; + } + + public void setRemainingNotional(String remainingNotional) { + this.remainingNotional = remainingNotional; + } + public static class Builder { + private String asset; + + private String liquidatedAmount; + + private String liquidatedNotional; + + private String remainingAmount; + + private String remainingNotional; + + public Builder asset(String asset) { + this.asset = asset; + return this; + } + + public Builder liquidatedAmount(String liquidatedAmount) { + this.liquidatedAmount = liquidatedAmount; + return this; + } + + public Builder liquidatedNotional(String liquidatedNotional) { + this.liquidatedNotional = liquidatedNotional; + return this; + } + + public Builder remainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + return this; + } + + public Builder remainingNotional(String remainingNotional) { + this.remainingNotional = remainingNotional; + return this; + } + + public XMLiquidatedAsset build() { + return new XMLiquidatedAsset(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/XMLiquidationDetail.java b/src/main/java/com/coinbase/prime/model/XMLiquidationDetail.java new file mode 100644 index 00000000..b21c3615 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/XMLiquidationDetail.java @@ -0,0 +1,251 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.XMLiquidatedAsset; +import com.coinbase.prime.model.enums.XMLiquidationStatus; +import com.coinbase.prime.model.XMSummary; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** XMLiquidationDetail provides detailed information about a single XM liquidation */ +public class XMLiquidationDetail { + /** + * 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; + + /** + * Timestamp when the pre-liquidation phase started + */ + @JsonProperty("pre_liquidation_start_time") + private OffsetDateTime preLiquidationStartTime; + + /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ + @JsonProperty("margin_summary") + private XMSummary marginSummary; + + /** + * Timestamp when active liquidation started + */ + @JsonProperty("liquidation_start_time") + private OffsetDateTime liquidationStartTime; + + /** + * USD notional amount that has been filled so far + */ + @JsonProperty("filled_amount") + private String filledAmount; + + /** + * USD notional amount remaining to be liquidated + */ + @JsonProperty("remaining_amount") + private String remainingAmount; + + /** + * Timestamp when the liquidation finished + */ + @JsonProperty("liquidation_finish_time") + private OffsetDateTime liquidationFinishTime; + + /** + * Per-asset breakdown of liquidated amounts + */ + @JsonProperty("asset_breakdown") + private List assetBreakdown; + + public XMLiquidationDetail() { + } + + public XMLiquidationDetail(Builder builder) { + this.liquidationId = builder.liquidationId; + this.status = builder.status; + this.shortfallAmount = builder.shortfallAmount; + this.preLiquidationStartTime = builder.preLiquidationStartTime; + this.marginSummary = builder.marginSummary; + this.liquidationStartTime = builder.liquidationStartTime; + this.filledAmount = builder.filledAmount; + this.remainingAmount = builder.remainingAmount; + this.liquidationFinishTime = builder.liquidationFinishTime; + this.assetBreakdown = builder.assetBreakdown; + } + 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 OffsetDateTime getPreLiquidationStartTime() { + return preLiquidationStartTime; + } + + public void setPreLiquidationStartTime(OffsetDateTime preLiquidationStartTime) { + this.preLiquidationStartTime = preLiquidationStartTime; + } + public XMSummary getMarginSummary() { + return marginSummary; + } + + public void setMarginSummary(XMSummary marginSummary) { + this.marginSummary = marginSummary; + } + public OffsetDateTime getLiquidationStartTime() { + return liquidationStartTime; + } + + public void setLiquidationStartTime(OffsetDateTime liquidationStartTime) { + this.liquidationStartTime = liquidationStartTime; + } + public String getFilledAmount() { + return filledAmount; + } + + public void setFilledAmount(String filledAmount) { + this.filledAmount = filledAmount; + } + public String getRemainingAmount() { + return remainingAmount; + } + + public void setRemainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + } + public OffsetDateTime getLiquidationFinishTime() { + return liquidationFinishTime; + } + + public void setLiquidationFinishTime(OffsetDateTime liquidationFinishTime) { + this.liquidationFinishTime = liquidationFinishTime; + } + public List getAssetBreakdown() { + return assetBreakdown; + } + + public void setAssetBreakdown(List assetBreakdown) { + this.assetBreakdown = assetBreakdown; + } + public static class Builder { + private String liquidationId; + + private XMLiquidationStatus status; + + private String shortfallAmount; + + private OffsetDateTime preLiquidationStartTime; + + private XMSummary marginSummary; + + private OffsetDateTime liquidationStartTime; + + private String filledAmount; + + private String remainingAmount; + + private OffsetDateTime liquidationFinishTime; + + private List assetBreakdown; + + 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 Builder preLiquidationStartTime(OffsetDateTime preLiquidationStartTime) { + this.preLiquidationStartTime = preLiquidationStartTime; + return this; + } + + public Builder marginSummary(XMSummary marginSummary) { + this.marginSummary = marginSummary; + return this; + } + + public Builder liquidationStartTime(OffsetDateTime liquidationStartTime) { + this.liquidationStartTime = liquidationStartTime; + return this; + } + + public Builder filledAmount(String filledAmount) { + this.filledAmount = filledAmount; + return this; + } + + public Builder remainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + return this; + } + + public Builder liquidationFinishTime(OffsetDateTime liquidationFinishTime) { + this.liquidationFinishTime = liquidationFinishTime; + return this; + } + + public Builder assetBreakdown(List assetBreakdown) { + this.assetBreakdown = assetBreakdown; + return this; + } + + public XMLiquidationDetail build() { + return new XMLiquidationDetail(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/XMLiquidationSummary.java b/src/main/java/com/coinbase/prime/model/XMLiquidationSummary.java new file mode 100644 index 00000000..3bcd4b22 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/XMLiquidationSummary.java @@ -0,0 +1,187 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.enums.XMLiquidationStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** XMLiquidationSummary provides a summary of a single XM liquidation */ +public class XMLiquidationSummary { + /** + * 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; + + /** + * USD notional amount that has been filled so far + */ + @JsonProperty("filled_amount") + private String filledAmount; + + /** + * USD notional amount remaining to be liquidated + */ + @JsonProperty("remaining_amount") + private String remainingAmount; + + /** + * Timestamp when the liquidation was created + */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * Timestamp when the liquidation was completed + */ + @JsonProperty("completed_at") + private OffsetDateTime completedAt; + + public XMLiquidationSummary() { + } + + public XMLiquidationSummary(Builder builder) { + this.liquidationId = builder.liquidationId; + this.status = builder.status; + this.shortfallAmount = builder.shortfallAmount; + this.filledAmount = builder.filledAmount; + this.remainingAmount = builder.remainingAmount; + this.createdAt = builder.createdAt; + this.completedAt = builder.completedAt; + } + 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 String getFilledAmount() { + return filledAmount; + } + + public void setFilledAmount(String filledAmount) { + this.filledAmount = filledAmount; + } + public String getRemainingAmount() { + return remainingAmount; + } + + public void setRemainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + } + 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 static class Builder { + private String liquidationId; + + private XMLiquidationStatus status; + + private String shortfallAmount; + + private String filledAmount; + + private String remainingAmount; + + private OffsetDateTime createdAt; + + private OffsetDateTime completedAt; + + 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 Builder filledAmount(String filledAmount) { + this.filledAmount = filledAmount; + return this; + } + + public Builder remainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder completedAt(OffsetDateTime completedAt) { + this.completedAt = completedAt; + return this; + } + + public XMLiquidationSummary build() { + return new XMLiquidationSummary(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/XMLoan.java b/src/main/java/com/coinbase/prime/model/XMLoan.java index 2ffa0d05..b148d913 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 31455a35..fe5603fa 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 89cc6920..1f67ec52 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 4c7069e8..5005a1b5 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 36d60ea4..fe662908 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 2815e302..0d3244b7 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 26d8ee77..5f542ed6 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 8206e0a3..a26ab850 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 db7f5fd2..78f58ff5 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 0ed46896..4dc402ad 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 07b0e264..01febb5a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AddressBookType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AddressBookType.java @@ -19,7 +19,7 @@ package com.coinbase.prime.model.enums; public enum AddressBookType { - ADDRESS_BOOK_TYPE_UNSPECIFIED, 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 f1240a21..c4f17a6c 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 6004744d..c7e15234 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 d4a71e87..dd155818 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 7e6c6a6d..a297c110 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AllocationStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/AllocationStatus.java @@ -19,9 +19,9 @@ package com.coinbase.prime.model.enums; public enum AllocationStatus { - ALLOCATION_STATUS_UNSPECIFIED, ALLOCATION_STATUS_ALLOCATION_PENDING, ALLOCATION_STATUS_ALLOCATION_ACCEPTED, 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 5c2b2e12..16b287d0 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 ac8a6463..0e68bce5 100644 --- a/src/main/java/com/coinbase/prime/model/enums/Benchmark.java +++ b/src/main/java/com/coinbase/prime/model/enums/Benchmark.java @@ -19,9 +19,9 @@ package com.coinbase.prime.model.enums; public enum Benchmark { - BENCHMARK_UNSET, ZERO, SOFR_360, SOFR_365, CRYPTO_RFR } + diff --git a/src/main/java/com/coinbase/prime/model/enums/BetaRewardsRateTierType.java b/src/main/java/com/coinbase/prime/model/enums/BetaRewardsRateTierType.java new file mode 100644 index 00000000..892c0457 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/BetaRewardsRateTierType.java @@ -0,0 +1,26 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +public enum BetaRewardsRateTierType { + REWARDS_RATE_TIER_TYPE_BALANCE, + REWARDS_RATE_TIER_TYPE_OPEN_INTEREST, + REWARDS_RATE_TIER_TYPE_PERCENT_VOLUME +} + 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 1d33cdc0..410cd250 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 d38db0b3..29368b36 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,18 @@ 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 */ - 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 b9c04f5e..d0e100ce 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/DerivativeProductType.java b/src/main/java/com/coinbase/prime/model/enums/DerivativeProductType.java new file mode 100644 index 00000000..f0ebf606 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/DerivativeProductType.java @@ -0,0 +1,72 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +/** + * The general type of a derivative product. + * - DERIVATIVE_PRODUCT_TYPE_UNSPECIFIED: Unknown product type. + * - DERIVATIVE_PRODUCT_TYPE_SPOT: Spot product. + * - DERIVATIVE_PRODUCT_TYPE_FUTURE: Future product. + * - DERIVATIVE_PRODUCT_TYPE_EQUITY: Equity product. + * - DERIVATIVE_PRODUCT_TYPE_PREDICTION_MARKET: Prediction market product. + * - DERIVATIVE_PRODUCT_TYPE_OPTION: Option product. + * - DERIVATIVE_PRODUCT_TYPE_BASIS: Basis product. + * - DERIVATIVE_PRODUCT_TYPE_EQUITY_OPTION: Equity option product. + * - DERIVATIVE_PRODUCT_TYPE_FUTURE_COMBO: Future combo product. + * - DERIVATIVE_PRODUCT_TYPE_OPTION_COMBO: Option combo product. + */ +public enum DerivativeProductType { + /** + * Spot product. + */ + DERIVATIVE_PRODUCT_TYPE_SPOT, + /** + * Future product. + */ + DERIVATIVE_PRODUCT_TYPE_FUTURE, + /** + * Equity product. + */ + DERIVATIVE_PRODUCT_TYPE_EQUITY, + /** + * Prediction market product. + */ + DERIVATIVE_PRODUCT_TYPE_PREDICTION_MARKET, + /** + * Option product. + */ + DERIVATIVE_PRODUCT_TYPE_OPTION, + /** + * Basis product. + */ + DERIVATIVE_PRODUCT_TYPE_BASIS, + /** + * Equity option product. + */ + DERIVATIVE_PRODUCT_TYPE_EQUITY_OPTION, + /** + * Future combo product. + */ + DERIVATIVE_PRODUCT_TYPE_FUTURE_COMBO, + /** + * Option combo product. + */ + DERIVATIVE_PRODUCT_TYPE_OPTION_COMBO +} + 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 a3f42239..a51dd3d7 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 5f229840..d2928cbe 100644 --- a/src/main/java/com/coinbase/prime/model/enums/EstimateType.java +++ b/src/main/java/com/coinbase/prime/model/enums/EstimateType.java @@ -19,7 +19,7 @@ package com.coinbase.prime.model.enums; public enum EstimateType { - UNSPECIFIED, 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 0d6ad821..b9a787da 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 0899ba48..275134fa 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallState.java @@ -19,9 +19,9 @@ package com.coinbase.prime.model.enums; public enum FcmMarginCallState { - FCM_MARGIN_CALL_STATE_UNSPECIFIED, FCM_MARGIN_CALL_STATE_CLOSED, FCM_MARGIN_CALL_STATE_ROLLED_OVER, 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 faf6005e..70aa5fee 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallType.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallType.java @@ -19,7 +19,7 @@ package com.coinbase.prime.model.enums; public enum FcmMarginCallType { - FCM_MARGIN_CALL_TYPE_UNSPECIFIED, 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 8a79aa63..7152a851 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,29 @@ 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. */ - 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 5e6cb96f..913f56bd 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmPositionSide.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmPositionSide.java @@ -19,7 +19,7 @@ package com.coinbase.prime.model.enums; public enum FcmPositionSide { - FCM_POSITION_SIDE_UNSPECIFIED, 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 9055adc2..601a36cc 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,23 @@ 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 */ - 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 727051cb..7f8d2798 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,33 @@ 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 */ - 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 49152e0a..5ca2618c 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FuturesSweepStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/FuturesSweepStatus.java @@ -19,9 +19,9 @@ package com.coinbase.prime.model.enums; public enum FuturesSweepStatus { - FCM_FUTURES_SWEEP_STATUS_UNSPECIFIED, FCM_FUTURES_SWEEP_STATUS_PENDING, FCM_FUTURES_SWEEP_STATUS_CLOSED, 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 80af7a66..9c4d0cf6 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,10 @@ 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 a4f14904..1741194f 100644 --- a/src/main/java/com/coinbase/prime/model/enums/InvoiceState.java +++ b/src/main/java/com/coinbase/prime/model/enums/InvoiceState.java @@ -18,11 +18,13 @@ package com.coinbase.prime.model.enums; -/** States */ +/** + * States + */ public enum InvoiceState { - INVOICE_STATE_UNSPECIFIED, INVOICE_STATE_IMPORTED, INVOICE_STATE_BILLED, 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 f69fc41e..a290a0b4 100644 --- a/src/main/java/com/coinbase/prime/model/enums/InvoiceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/InvoiceType.java @@ -18,12 +18,14 @@ package com.coinbase.prime.model.enums; -/** Types */ +/** + * Types + */ public enum InvoiceType { - INVOICE_TYPE_UNSPECIFIED, INVOICE_TYPE_AUC_FEE, INVOICE_TYPE_MINIMUM_FEE, INVOICE_TYPE_WITHDRAWAL_FEE, 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 b93f60eb..aa162682 100644 --- a/src/main/java/com/coinbase/prime/model/enums/LoanType.java +++ b/src/main/java/com/coinbase/prime/model/enums/LoanType.java @@ -19,7 +19,6 @@ package com.coinbase.prime.model.enums; public enum LoanType { - LOAN_TYPE_UNSET, BILATERAL_LENDING, TRADE_FINANCE, PORTFOLIO_MARGIN, @@ -27,3 +26,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 691d526a..9c297d17 100644 --- a/src/main/java/com/coinbase/prime/model/enums/MarginAddOnType.java +++ b/src/main/java/com/coinbase/prime/model/enums/MarginAddOnType.java @@ -19,9 +19,9 @@ package com.coinbase.prime.model.enums; public enum MarginAddOnType { - MARGIN_ADD_ON_TYPE_UNSPECIFIED, SINGLE_COIN_STRESS, CONCENTRATION_STRESS, 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 929cad84..27b38c30 100644 --- a/src/main/java/com/coinbase/prime/model/enums/NetworkFamily.java +++ b/src/main/java/com/coinbase/prime/model/enums/NetworkFamily.java @@ -19,7 +19,7 @@ package com.coinbase.prime.model.enums; public enum NetworkFamily { - NETWORK_FAMILY_UNSPECIFIED, 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 64801206..9e41a9e4 100644 --- a/src/main/java/com/coinbase/prime/model/enums/NetworkType.java +++ b/src/main/java/com/coinbase/prime/model/enums/NetworkType.java @@ -19,7 +19,7 @@ package com.coinbase.prime.model.enums; public enum NetworkType { - NETWORK_TYPE_UNSPECIFIED, NETWORK_TYPE_EVM, NETWORK_TYPE_SOLANA } + diff --git a/src/main/java/com/coinbase/prime/model/enums/OptionType.java b/src/main/java/com/coinbase/prime/model/enums/OptionType.java new file mode 100644 index 00000000..f980e020 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/OptionType.java @@ -0,0 +1,37 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +/** + * The type of an option position. + * - OPTION_TYPE_UNSPECIFIED: Unspecified option type. + * - OPTION_TYPE_CALL: Call option. + * - OPTION_TYPE_PUT: Put option. + */ +public enum OptionType { + /** + * Call option. + */ + OPTION_TYPE_CALL, + /** + * Put option. + */ + OPTION_TYPE_PUT +} + 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 54b98914..e68e939f 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 2417a3e8..14f4d8dd 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 2550fa9e..78268a60 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 2e558cdd..f95388d3 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 7b7404d0..fa23d080 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 9f711240..b1a24dd3 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 5cecbb68..7c5c390a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java @@ -19,7 +19,7 @@ package com.coinbase.prime.model.enums; public enum PositionReferenceType { - POSITION_REFERENCE_TYPE_UNSPECIFIED, 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 735a272b..4a4f05b4 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 84ce0ea8..e2c813fa 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,22 @@ 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 3f1d78ef..96443809 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 f154024f..e05141ec 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,32 @@ 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 bb8f79c6..f14469a9 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,17 @@ 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 28dfd3e0..ccf64578 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,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 6c76a1d0..f54d3ee3 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 4a3a454d..83fd295c 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,24 @@ 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 + * - OPTION: Option product + */ public enum ProductType { - /** Spot product */ + /** + * Spot product + */ SPOT, - /** Future product */ - FUTURE + /** + * Future product + */ + FUTURE, + /** + * Option product + */ + OPTION } + 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 4def4974..8cd582ca 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RateType.java +++ b/src/main/java/com/coinbase/prime/model/enums/RateType.java @@ -19,9 +19,9 @@ package com.coinbase.prime.model.enums; public enum RateType { - RATE_TYPE_UNSET, BPS, APR_360, 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 40e21765..9f84323b 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 15d8f96b..a362cef2 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,18 @@ 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 */ - 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 5eb5ca0e..7c10474a 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/SettlementModel.java b/src/main/java/com/coinbase/prime/model/enums/SettlementModel.java new file mode 100644 index 00000000..11dc9bcb --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/SettlementModel.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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +/** + * - SETTLEMENT_MODEL_UNSPECIFIED: Unspecified settlement model + * - SETTLEMENT_MODEL_LINEAR: Settles in the quote currency + * - SETTLEMENT_MODEL_INVERSE: Settles in the base currency + */ +public enum SettlementModel { + /** + * Settles in the quote currency + */ + SETTLEMENT_MODEL_LINEAR, + /** + * Settles in the base currency + */ + SETTLEMENT_MODEL_INVERSE +} + diff --git a/src/main/java/com/coinbase/prime/model/enums/SettlementPeriod.java b/src/main/java/com/coinbase/prime/model/enums/SettlementPeriod.java new file mode 100644 index 00000000..4c05dcaf --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/SettlementPeriod.java @@ -0,0 +1,46 @@ +/* + * 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. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +/** + * - SETTLEMENT_PERIOD_UNSPECIFIED: Unspecified settlement period + * - SETTLEMENT_PERIOD_PERPETUAL: Contract never expires + * - SETTLEMENT_PERIOD_DAY: Contract expires daily + * - SETTLEMENT_PERIOD_WEEK: Contract expires weekly + * - SETTLEMENT_PERIOD_MONTH: Contract expires monthly + */ +public enum SettlementPeriod { + /** + * Contract never expires + */ + SETTLEMENT_PERIOD_PERPETUAL, + /** + * Contract expires daily + */ + SETTLEMENT_PERIOD_DAY, + /** + * Contract expires weekly + */ + SETTLEMENT_PERIOD_WEEK, + /** + * Contract expires monthly + */ + SETTLEMENT_PERIOD_MONTH +} + 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 3a120f8f..48abbe12 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 37697a09..0d644b64 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 7b557a7a..e4e2392b 100644 --- a/src/main/java/com/coinbase/prime/model/enums/StakeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/StakeType.java @@ -19,7 +19,7 @@ package com.coinbase.prime.model.enums; public enum StakeType { - STAKE_TYPE_UNSPECIFIED, 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 a1b3807a..333a5750 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 29c1e28f..c5f18fc3 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 33446ae3..8fb94e7a 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,189 @@ 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 + * - MERGE_STAKE: On-chain transaction consolidating funds from different addresses belonging to the same wallet. */ 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_UNSTAKE + /** + * Portfolio-level unstaking operation + */ + PORTFOLIO_UNSTAKE, + /** + * On-chain transaction consolidating funds from different addresses belonging to the same wallet. + */ + MERGE_STAKE } + 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 7dfe4c14..28d2e56e 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 f5cdd05d..5e57f7db 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,11 @@ 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 3cebb9fc..a65f7dde 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,18 @@ 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 */ - 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 02b315aa..d80487d8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/UnstakeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/UnstakeType.java @@ -19,7 +19,7 @@ package com.coinbase.prime.model.enums; public enum UnstakeType { - UNSTAKE_TYPE_UNSPECIFIED, 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 30945e8e..e3194772 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 c1c1468d..68fd489a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java +++ b/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java @@ -19,13 +19,9 @@ package com.coinbase.prime.model.enums; /** - * 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. + * ValidatorProvider enumerates the ETH validator service providers accepted for unstaking. */ public enum ValidatorProvider { - VALIDATOR_PROVIDER_UNSPECIFIED, VALIDATOR_PROVIDER_COINBASE_CLOUD, VALIDATOR_PROVIDER_MAVAN, VALIDATOR_PROVIDER_FIGMENT, @@ -33,3 +29,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 ca906855..c11b5792 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ValidatorStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/ValidatorStatus.java @@ -19,10 +19,10 @@ package com.coinbase.prime.model.enums; public enum ValidatorStatus { - VALIDATOR_STATUS_UNSPECIFIED, VALIDATOR_STATUS_PENDING, VALIDATOR_STATUS_ACTIVE, VALIDATOR_STATUS_EXITING, 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 7511547f..06a66e1e 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 04d77491..b6e849d3 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 71f277a4..481e8b22 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 1b3ac962..f6137243 100644 --- a/src/main/java/com/coinbase/prime/model/enums/WalletVisibility.java +++ b/src/main/java/com/coinbase/prime/model/enums/WalletVisibility.java @@ -19,7 +19,7 @@ package com.coinbase.prime.model.enums; public enum WalletVisibility { - WALLET_VISIBILITY_UNSPECIFIED, 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 2882aeda..03f83451 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,27 @@ 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 90b01c88..0bdf4d78 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,22 @@ 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 cb90db08..33b8f684 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,22 @@ 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 5e9b3049..1b28c00e 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,34 @@ 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 d4286ce3..7c01eb10 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,32 @@ 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 76d25bc9..850e2d1d 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,32 @@ 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 1155e6b2..2db8ee43 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,17 @@ 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 } + diff --git a/tools/model-generator/.openapi-generator-ignore b/tools/model-generator/.openapi-generator-ignore index 56374009..bdfbf8b2 100644 --- a/tools/model-generator/.openapi-generator-ignore +++ b/tools/model-generator/.openapi-generator-ignore @@ -6,6 +6,13 @@ src/main/java/com/coinbase/prime/model/*Request.java src/main/java/com/coinbase/prime/model/*Response.java +# Per-operation typed error payloads and codes (not consumed by the SDK yet) +src/main/java/com/coinbase/prime/model/*ErrorResponse.java +src/main/java/com/coinbase/prime/model/*ErrorCode.java +src/main/java/com/coinbase/prime/model/*Subcode.java +src/main/java/com/coinbase/prime/model/enums/*ErrorCode.java +src/main/java/com/coinbase/prime/model/enums/*Subcode.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 diff --git a/tools/model-generator/pom.xml b/tools/model-generator/pom.xml index 10948cd9..002abbc2 100644 --- a/tools/model-generator/pom.xml +++ b/tools/model-generator/pom.xml @@ -17,7 +17,7 @@ 11 11 UTF-8 - 7.14.0 + 7.25.0 2.18.9 1.13.0 2.2 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 5061a619..18651b4e 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 @@ -198,7 +198,8 @@ 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" + !fileName.matches(".*Api\\.java$") && // Only skip files ending with "Api.java", not containing "Api" + !isSkippedErrorSchema(fileName)) { files.add(file); } return FileVisitResult.CONTINUE; @@ -209,6 +210,17 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { return files; } + /** + * Typed error-code / subcode schemas from the spec are omitted until the SDK + * maps HTTP errors onto them. Matching files are also ignored by + * {@code .openapi-generator-ignore} so they are not copied into {@code model/enums}. + */ + static boolean isSkippedErrorSchema(String fileName) { + return fileName.endsWith("ErrorCode.java") + || fileName.endsWith("Subcode.java") + || fileName.endsWith("ErrorResponse.java"); + } + private boolean isEnumFile(Path file) throws IOException { String content = Files.readString(file); return content.contains("public enum "); diff --git a/tools/model-generator/src/test/java/com/coinbase/tools/modelgenerator/PostProcessorJavadocTest.java b/tools/model-generator/src/test/java/com/coinbase/tools/modelgenerator/PostProcessorJavadocTest.java index f49d4b2b..c7813640 100644 --- a/tools/model-generator/src/test/java/com/coinbase/tools/modelgenerator/PostProcessorJavadocTest.java +++ b/tools/model-generator/src/test/java/com/coinbase/tools/modelgenerator/PostProcessorJavadocTest.java @@ -17,11 +17,22 @@ package com.coinbase.tools.modelgenerator; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.jupiter.api.Test; class PostProcessorJavadocTest { + @Test + void isSkippedErrorSchema_skipsTypedErrorEnumsAndResponses() { + assertTrue(PostProcessor.isSkippedErrorSchema("BadRequestErrorCode.java")); + assertTrue(PostProcessor.isSkippedErrorSchema("RotateAPIKeyForbiddenSubcode.java")); + assertTrue(PostProcessor.isSkippedErrorSchema("GetConversionFeesForbiddenErrorResponse.java")); + assertFalse(PostProcessor.isSkippedErrorSchema("TransactionType.java")); + assertFalse(PostProcessor.isSkippedErrorSchema("Order.java")); + } + @Test void decodeHtmlEntities_decodesCommonEntities() { assertEquals( From ad219024ce2217b37136c4da1efc4cffd0b3d810 Mon Sep 17 00:00:00 2001 From: Carl Fluke Date: Tue, 1 Sep 2026 16:23:46 -0400 Subject: [PATCH 2/7] add new endpoints and examples Co-authored-by: Cursor --- CHANGELOG.md | 45 ++++++ README.md | 17 ++- pom.xml | 2 +- .../examples/apikey/RotateApiKey.java | 52 +++++++ .../examples/financing/GetConversionFees.java | 42 ++++++ .../financing/GetEntityRewardsRate.java | 46 ++++++ .../financing/GetPortfolioRewardsRate.java | 46 ++++++ .../examples/financing/GetXmLiquidation.java | 46 ++++++ .../financing/ListXmLiquidations.java | 46 ++++++ .../futures/GetDerivativePositions.java | 46 ++++++ .../GetDerivativesCurrencySummary.java | 46 ++++++ .../coinbase/prime/apikey/ApiKeyService.java | 35 +++++ .../prime/apikey/ApiKeyServiceImpl.java | 41 +++++ .../prime/apikey/RotateApiKeyRequest.java | 59 ++++++++ .../prime/apikey/RotateApiKeyResponse.java | 54 +++++++ .../prime/factory/PrimeServiceFactory.java | 6 + .../prime/financing/FinancingService.java | 67 +++++++++ .../prime/financing/FinancingServiceImpl.java | 54 +++++++ .../financing/GetConversionFeesResponse.java | 36 +++++ .../GetEntityRewardsRateRequest.java | 66 +++++++++ .../GetEntityRewardsRateResponse.java | 47 ++++++ .../GetPortfolioRewardsRateRequest.java | 66 +++++++++ .../GetPortfolioRewardsRateResponse.java | 47 ++++++ .../financing/GetXmLiquidationRequest.java | 86 +++++++++++ .../financing/GetXmLiquidationResponse.java | 36 +++++ .../financing/ListXmLiquidationsRequest.java | 140 ++++++++++++++++++ .../financing/ListXmLiquidationsResponse.java | 48 ++++++ .../prime/futures/FuturesService.java | 29 ++++ .../prime/futures/FuturesServiceImpl.java | 22 +++ .../GetDerivativePositionsRequest.java | 84 +++++++++++ .../GetDerivativePositionsResponse.java | 36 +++++ .../GetDerivativesCurrencySummaryRequest.java | 66 +++++++++ ...GetDerivativesCurrencySummaryResponse.java | 47 ++++++ .../prime/orders/CreateOrderRequest.java | 19 +++ .../prime/orders/GetOrderPreviewRequest.java | 19 +++ .../prime/orders/GetOrderPreviewResponse.java | 12 ++ .../com/coinbase/prime/utils/Constants.java | 2 +- .../ApiKeyServiceSerializationTest.java | 64 ++++++++ .../FinancingServiceSerializationTest.java | 77 ++++++++++ .../FuturesServiceSerializationTest.java | 43 ++++++ .../prime/integration/FinancingIT.java | 51 +++++++ .../coinbase/prime/integration/FuturesIT.java | 24 +++ .../VersionHeaderIntegrationTest.java | 10 +- .../coinbase/prime/utils/ConstantsTest.java | 2 +- 44 files changed, 1920 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/coinbase/examples/apikey/RotateApiKey.java create mode 100644 src/main/java/com/coinbase/examples/financing/GetConversionFees.java create mode 100644 src/main/java/com/coinbase/examples/financing/GetEntityRewardsRate.java create mode 100644 src/main/java/com/coinbase/examples/financing/GetPortfolioRewardsRate.java create mode 100644 src/main/java/com/coinbase/examples/financing/GetXmLiquidation.java create mode 100644 src/main/java/com/coinbase/examples/financing/ListXmLiquidations.java create mode 100644 src/main/java/com/coinbase/examples/futures/GetDerivativePositions.java create mode 100644 src/main/java/com/coinbase/examples/futures/GetDerivativesCurrencySummary.java create mode 100644 src/main/java/com/coinbase/prime/apikey/ApiKeyService.java create mode 100644 src/main/java/com/coinbase/prime/apikey/ApiKeyServiceImpl.java create mode 100644 src/main/java/com/coinbase/prime/apikey/RotateApiKeyRequest.java create mode 100644 src/main/java/com/coinbase/prime/apikey/RotateApiKeyResponse.java create mode 100644 src/main/java/com/coinbase/prime/financing/GetConversionFeesResponse.java create mode 100644 src/main/java/com/coinbase/prime/financing/GetEntityRewardsRateRequest.java create mode 100644 src/main/java/com/coinbase/prime/financing/GetEntityRewardsRateResponse.java create mode 100644 src/main/java/com/coinbase/prime/financing/GetPortfolioRewardsRateRequest.java create mode 100644 src/main/java/com/coinbase/prime/financing/GetPortfolioRewardsRateResponse.java create mode 100644 src/main/java/com/coinbase/prime/financing/GetXmLiquidationRequest.java create mode 100644 src/main/java/com/coinbase/prime/financing/GetXmLiquidationResponse.java create mode 100644 src/main/java/com/coinbase/prime/financing/ListXmLiquidationsRequest.java create mode 100644 src/main/java/com/coinbase/prime/financing/ListXmLiquidationsResponse.java create mode 100644 src/main/java/com/coinbase/prime/futures/GetDerivativePositionsRequest.java create mode 100644 src/main/java/com/coinbase/prime/futures/GetDerivativePositionsResponse.java create mode 100644 src/main/java/com/coinbase/prime/futures/GetDerivativesCurrencySummaryRequest.java create mode 100644 src/main/java/com/coinbase/prime/futures/GetDerivativesCurrencySummaryResponse.java create mode 100644 src/test/java/com/coinbase/prime/apikey/ApiKeyServiceSerializationTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 13d99d67..8b6e7d55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,50 @@ # Changelog +## [1.11.0] - 2026-SEP-01 + +### Added + +#### New API Endpoints + +**ApiKey Service** +- **`rotateApiKey()`**: Rotate the invoking API key (`POST /v1/api-keys/rotate`) + +**Financing Service** +- **`getConversionFees()`**: Get organization conversion fee tiers and month-to-date volume (`GET /v1/conversion/fees`) +- **`getXmLiquidation()`**: Get detailed XM liquidation data (`GET /v1/entities/{entity_id}/cross_margin/liquidation`) +- **`listXmLiquidations()`**: List XM liquidation history (`GET /v1/entities/{entity_id}/cross_margin/liquidations`) +- **`getEntityRewardsRate()`**: Get entity rewards rate and tiers (beta) (`GET /v1/entities/{entity_id}/rewards/rate`) +- **`getPortfolioRewardsRate()`**: Get portfolio rewards rate and tiers (beta) (`GET /v1/portfolios/{portfolio_id}/rewards/rate`) + +**Futures Service** +- **`getDerivativesCurrencySummary()`**: Get per-currency international derivatives balances (`GET /v1/portfolios/{portfolio_id}/derivatives/currency_summary`) +- **`getDerivativePositions()`**: List active derivative positions for a portfolio (`GET /v1/portfolios/{portfolio_id}/derivatives/positions`) + +#### New & Updated Models +- **`ConversionFee`**, **`ConversionFeeTier`**: Stablecoin conversion fee schedule types +- **`XMLiquidationDetail`**, **`XMLiquidationSummary`**, **`XMLiquidatedAsset`**: Cross-margin liquidation types +- **`BetaRewardsRateTier`**: Rewards rate tier (beta) +- **`DerivativePosition`**, **`DerivativesCurrencyBalance`**, **`OptionsDetails`**, **`OptionProductDetails`**: Derivatives product and position types +- **`CustomStablecoinAsset`**, **`ComboLeg`**, **`PriceIncrementStep`**: Supporting product/reward types +- **`Order`**: Added `isBuyExact` +- **`CreateOrderRequest`**, **`GetOrderPreviewRequest`**, **`GetOrderPreviewResponse`**: Added `isBuyExact` +- **`Product`**: Added `optionProductDetails` +- **`TravelRuleParty`**: Added `vaspAddress` +- **`WalletStakeInputs`**: Added `endDate` +- **`WalletUnstakeInputs`**: Added `validatorAddress` +- **`CustomStablecoinRewardDetails`**: Added `asset` + +#### New Enums +- **`XMLiquidationStatus`**, **`BetaRewardsRateTierType`**, **`DerivativeProductType`**, **`OptionType`**, **`SettlementModel`**, **`SettlementPeriod`** +- **`ProductType`**: Added `OPTION` +- **`TransactionType`**: Added `MERGE_STAKE` + +### Notes + +- Minor release: new endpoints including API key rotation, plus regenerated models from the latest OpenAPI spec via **OpenAPI Generator 7.25.0**. +- Model generation skips per-operation typed error-code and subcode enums until the SDK consumes them. +- Rewards rate endpoints are marked beta in the spec. + ## [1.10.3] - 2026-JUL-28 ### Added diff --git a/README.md b/README.md index cdbf8c13..6c499d5c 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ The SDK is organized into service interfaces under `com.coinbase.prime.*`, each | `AddressBookService` | `com.coinbase.prime.addressbook` | | `AdvancedTransferService` | `com.coinbase.prime.advancedtransfer` | | `AllocationsService` | `com.coinbase.prime.allocations` | +| `ApiKeyService` | `com.coinbase.prime.apikey` | | `AssetsService` | `com.coinbase.prime.assets` | | `BalancesService` | `com.coinbase.prime.balances` | | `CommissionService` | `com.coinbase.prime.commission` | @@ -140,6 +141,20 @@ mvn exec:java -Dexec.mainClass="com.coinbase.examples.transactions.ListPortfolio - `com.coinbase.examples.wallets.ListWalletAddresses ` - List addresses for a wallet - `com.coinbase.examples.wallets.GetWalletDepositInstructions [deposit-type]` - Get deposit instructions (deposit-type: CRYPTO, WIRE, SEN, SWIFT, SEPA) +**API Key:** +- `com.coinbase.examples.apikey.RotateApiKey` - Rotate the invoking API key (starts a real rotation) + +**Financing:** +- `com.coinbase.examples.financing.GetConversionFees` - Get organization conversion fee tiers +- `com.coinbase.examples.financing.GetXmLiquidation` - Get XM liquidation details +- `com.coinbase.examples.financing.ListXmLiquidations` - List XM liquidation history +- `com.coinbase.examples.financing.GetEntityRewardsRate` - Get entity rewards rate (beta) +- `com.coinbase.examples.financing.GetPortfolioRewardsRate` - Get portfolio rewards rate (beta) + +**Futures:** +- `com.coinbase.examples.futures.GetDerivativesCurrencySummary` - Get portfolio derivatives currency summary +- `com.coinbase.examples.futures.GetDerivativePositions` - List portfolio derivative positions + **Other:** - `com.coinbase.examples.Main` - Comprehensive example with multiple API calls @@ -170,7 +185,7 @@ The SDK tracks the published Prime OpenAPI definition in **apiSpec/prime-public- make fetch-spec ``` -Models, enums, per-operation request/response types, services, and `PrimeServiceFactory` are **hand-maintained** to match that spec. Example programs under `com.coinbase.examples` ship in the same module and compile with **`mvn compile`**—keep them in sync when the SDK API changes. +Models and enums under `com.coinbase.prime.model` are regenerated from that spec via `tools/model-generator`. Per-operation request/response types, services, and `PrimeServiceFactory` are hand-maintained. Typed error-code / subcode schemas from the spec are skipped for now. Example programs under `com.coinbase.examples` ship in the same module and compile with **`mvn compile`**—keep them in sync when the SDK API changes. ## Changelog diff --git a/pom.xml b/pom.xml index 43ae762c..b89f595f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ Java SDK for the Coinbase Prime REST APIs com.coinbase.prime https://github.com/coinbase/prime-sdk-java - 1.10.3 + 1.11.0 Apache License, Version 2.0 diff --git a/src/main/java/com/coinbase/examples/apikey/RotateApiKey.java b/src/main/java/com/coinbase/examples/apikey/RotateApiKey.java new file mode 100644 index 00000000..a9397b5c --- /dev/null +++ b/src/main/java/com/coinbase/examples/apikey/RotateApiKey.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.examples.apikey; + +import com.coinbase.prime.apikey.ApiKeyService; +import com.coinbase.prime.apikey.RotateApiKeyRequest; +import com.coinbase.prime.apikey.RotateApiKeyResponse; +import com.coinbase.prime.client.CoinbasePrimeClient; +import com.coinbase.prime.credentials.CoinbasePrimeCredentials; +import com.coinbase.prime.factory.PrimeServiceFactory; +import com.coinbase.prime.utils.Utils; + +/** + * Rotates the invoking API key. This starts a real key-rotation activity and should only be run + * intentionally. + */ +public class RotateApiKey { + public static void main(String[] args) { + try { + CoinbasePrimeCredentials credentials = + new CoinbasePrimeCredentials(System.getenv("COINBASE_PRIME_CREDENTIALS")); + CoinbasePrimeClient client = new CoinbasePrimeClient(credentials); + + ApiKeyService service = PrimeServiceFactory.createApiKeyService(client); + RotateApiKeyRequest.Builder builder = new RotateApiKeyRequest.Builder(); + String durationSeconds = System.getenv("DURATION_SECONDS"); + if (durationSeconds != null && !durationSeconds.isEmpty()) { + builder.durationSeconds(Long.parseLong(durationSeconds)); + } + RotateApiKeyResponse response = service.rotateApiKey(builder.build()); + + System.out.println( + Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/coinbase/examples/financing/GetConversionFees.java b/src/main/java/com/coinbase/examples/financing/GetConversionFees.java new file mode 100644 index 00000000..8209f45c --- /dev/null +++ b/src/main/java/com/coinbase/examples/financing/GetConversionFees.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.examples.financing; + +import com.coinbase.prime.client.CoinbasePrimeClient; +import com.coinbase.prime.credentials.CoinbasePrimeCredentials; +import com.coinbase.prime.factory.PrimeServiceFactory; +import com.coinbase.prime.financing.FinancingService; +import com.coinbase.prime.financing.GetConversionFeesResponse; +import com.coinbase.prime.utils.Utils; + +public class GetConversionFees { + public static void main(String[] args) { + try { + CoinbasePrimeCredentials credentials = + new CoinbasePrimeCredentials(System.getenv("COINBASE_PRIME_CREDENTIALS")); + CoinbasePrimeClient client = new CoinbasePrimeClient(credentials); + + FinancingService service = PrimeServiceFactory.createFinancingService(client); + GetConversionFeesResponse response = service.getConversionFees(); + + System.out.println( + Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/coinbase/examples/financing/GetEntityRewardsRate.java b/src/main/java/com/coinbase/examples/financing/GetEntityRewardsRate.java new file mode 100644 index 00000000..c760d1dd --- /dev/null +++ b/src/main/java/com/coinbase/examples/financing/GetEntityRewardsRate.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.examples.financing; + +import com.coinbase.prime.client.CoinbasePrimeClient; +import com.coinbase.prime.credentials.CoinbasePrimeCredentials; +import com.coinbase.prime.factory.PrimeServiceFactory; +import com.coinbase.prime.financing.FinancingService; +import com.coinbase.prime.financing.GetEntityRewardsRateRequest; +import com.coinbase.prime.financing.GetEntityRewardsRateResponse; +import com.coinbase.prime.utils.Utils; + +public class GetEntityRewardsRate { + public static void main(String[] args) { + try { + CoinbasePrimeCredentials credentials = + new CoinbasePrimeCredentials(System.getenv("COINBASE_PRIME_CREDENTIALS")); + CoinbasePrimeClient client = new CoinbasePrimeClient(credentials); + String entityId = System.getenv("COINBASE_PRIME_ENTITY_ID"); + + FinancingService service = PrimeServiceFactory.createFinancingService(client); + GetEntityRewardsRateResponse response = + service.getEntityRewardsRate( + new GetEntityRewardsRateRequest.Builder().entityId(entityId).build()); + + System.out.println( + Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/coinbase/examples/financing/GetPortfolioRewardsRate.java b/src/main/java/com/coinbase/examples/financing/GetPortfolioRewardsRate.java new file mode 100644 index 00000000..0f3ce103 --- /dev/null +++ b/src/main/java/com/coinbase/examples/financing/GetPortfolioRewardsRate.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.examples.financing; + +import com.coinbase.prime.client.CoinbasePrimeClient; +import com.coinbase.prime.credentials.CoinbasePrimeCredentials; +import com.coinbase.prime.factory.PrimeServiceFactory; +import com.coinbase.prime.financing.FinancingService; +import com.coinbase.prime.financing.GetPortfolioRewardsRateRequest; +import com.coinbase.prime.financing.GetPortfolioRewardsRateResponse; +import com.coinbase.prime.utils.Utils; + +public class GetPortfolioRewardsRate { + public static void main(String[] args) { + try { + CoinbasePrimeCredentials credentials = + new CoinbasePrimeCredentials(System.getenv("COINBASE_PRIME_CREDENTIALS")); + CoinbasePrimeClient client = new CoinbasePrimeClient(credentials); + String portfolioId = System.getenv("COINBASE_PRIME_PORTFOLIO_ID"); + + FinancingService service = PrimeServiceFactory.createFinancingService(client); + GetPortfolioRewardsRateResponse response = + service.getPortfolioRewardsRate( + new GetPortfolioRewardsRateRequest.Builder().portfolioId(portfolioId).build()); + + System.out.println( + Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/coinbase/examples/financing/GetXmLiquidation.java b/src/main/java/com/coinbase/examples/financing/GetXmLiquidation.java new file mode 100644 index 00000000..c903b4d8 --- /dev/null +++ b/src/main/java/com/coinbase/examples/financing/GetXmLiquidation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.examples.financing; + +import com.coinbase.prime.client.CoinbasePrimeClient; +import com.coinbase.prime.credentials.CoinbasePrimeCredentials; +import com.coinbase.prime.factory.PrimeServiceFactory; +import com.coinbase.prime.financing.FinancingService; +import com.coinbase.prime.financing.GetXmLiquidationRequest; +import com.coinbase.prime.financing.GetXmLiquidationResponse; +import com.coinbase.prime.utils.Utils; + +public class GetXmLiquidation { + public static void main(String[] args) { + try { + CoinbasePrimeCredentials credentials = + new CoinbasePrimeCredentials(System.getenv("COINBASE_PRIME_CREDENTIALS")); + CoinbasePrimeClient client = new CoinbasePrimeClient(credentials); + String entityId = System.getenv("COINBASE_PRIME_ENTITY_ID"); + + FinancingService service = PrimeServiceFactory.createFinancingService(client); + GetXmLiquidationResponse response = + service.getXmLiquidation( + new GetXmLiquidationRequest.Builder().entityId(entityId).build()); + + System.out.println( + Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/coinbase/examples/financing/ListXmLiquidations.java b/src/main/java/com/coinbase/examples/financing/ListXmLiquidations.java new file mode 100644 index 00000000..9e15c465 --- /dev/null +++ b/src/main/java/com/coinbase/examples/financing/ListXmLiquidations.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.examples.financing; + +import com.coinbase.prime.client.CoinbasePrimeClient; +import com.coinbase.prime.credentials.CoinbasePrimeCredentials; +import com.coinbase.prime.factory.PrimeServiceFactory; +import com.coinbase.prime.financing.FinancingService; +import com.coinbase.prime.financing.ListXmLiquidationsRequest; +import com.coinbase.prime.financing.ListXmLiquidationsResponse; +import com.coinbase.prime.utils.Utils; + +public class ListXmLiquidations { + public static void main(String[] args) { + try { + CoinbasePrimeCredentials credentials = + new CoinbasePrimeCredentials(System.getenv("COINBASE_PRIME_CREDENTIALS")); + CoinbasePrimeClient client = new CoinbasePrimeClient(credentials); + String entityId = System.getenv("COINBASE_PRIME_ENTITY_ID"); + + FinancingService service = PrimeServiceFactory.createFinancingService(client); + ListXmLiquidationsResponse response = + service.listXmLiquidations( + new ListXmLiquidationsRequest.Builder().entityId(entityId).build()); + + System.out.println( + Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/coinbase/examples/futures/GetDerivativePositions.java b/src/main/java/com/coinbase/examples/futures/GetDerivativePositions.java new file mode 100644 index 00000000..ef6e1734 --- /dev/null +++ b/src/main/java/com/coinbase/examples/futures/GetDerivativePositions.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.examples.futures; + +import com.coinbase.prime.client.CoinbasePrimeClient; +import com.coinbase.prime.credentials.CoinbasePrimeCredentials; +import com.coinbase.prime.factory.PrimeServiceFactory; +import com.coinbase.prime.futures.FuturesService; +import com.coinbase.prime.futures.GetDerivativePositionsRequest; +import com.coinbase.prime.futures.GetDerivativePositionsResponse; +import com.coinbase.prime.utils.Utils; + +public class GetDerivativePositions { + public static void main(String[] args) { + try { + CoinbasePrimeCredentials credentials = + new CoinbasePrimeCredentials(System.getenv("COINBASE_PRIME_CREDENTIALS")); + CoinbasePrimeClient client = new CoinbasePrimeClient(credentials); + String portfolioId = System.getenv("COINBASE_PRIME_PORTFOLIO_ID"); + + FuturesService service = PrimeServiceFactory.createFuturesService(client); + GetDerivativePositionsResponse response = + service.getDerivativePositions( + new GetDerivativePositionsRequest.Builder().portfolioId(portfolioId).build()); + + System.out.println( + Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/coinbase/examples/futures/GetDerivativesCurrencySummary.java b/src/main/java/com/coinbase/examples/futures/GetDerivativesCurrencySummary.java new file mode 100644 index 00000000..4be6f7ea --- /dev/null +++ b/src/main/java/com/coinbase/examples/futures/GetDerivativesCurrencySummary.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.examples.futures; + +import com.coinbase.prime.client.CoinbasePrimeClient; +import com.coinbase.prime.credentials.CoinbasePrimeCredentials; +import com.coinbase.prime.factory.PrimeServiceFactory; +import com.coinbase.prime.futures.FuturesService; +import com.coinbase.prime.futures.GetDerivativesCurrencySummaryRequest; +import com.coinbase.prime.futures.GetDerivativesCurrencySummaryResponse; +import com.coinbase.prime.utils.Utils; + +public class GetDerivativesCurrencySummary { + public static void main(String[] args) { + try { + CoinbasePrimeCredentials credentials = + new CoinbasePrimeCredentials(System.getenv("COINBASE_PRIME_CREDENTIALS")); + CoinbasePrimeClient client = new CoinbasePrimeClient(credentials); + String portfolioId = System.getenv("COINBASE_PRIME_PORTFOLIO_ID"); + + FuturesService service = PrimeServiceFactory.createFuturesService(client); + GetDerivativesCurrencySummaryResponse response = + service.getDerivativesCurrencySummary( + new GetDerivativesCurrencySummaryRequest.Builder().portfolioId(portfolioId).build()); + + System.out.println( + Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/coinbase/prime/apikey/ApiKeyService.java b/src/main/java/com/coinbase/prime/apikey/ApiKeyService.java new file mode 100644 index 00000000..689e027c --- /dev/null +++ b/src/main/java/com/coinbase/prime/apikey/ApiKeyService.java @@ -0,0 +1,35 @@ +/* + * 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.apikey; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.coinbase.prime.errors.CoinbasePrimeException; + +public interface ApiKeyService { + /** + * Rotate API Key. + * + *

Generates a new API key with the same configuration as the invoking key. + * + * @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 + */ + RotateApiKeyResponse rotateApiKey(RotateApiKeyRequest request) + throws CoinbaseClientException, CoinbasePrimeException; +} diff --git a/src/main/java/com/coinbase/prime/apikey/ApiKeyServiceImpl.java b/src/main/java/com/coinbase/prime/apikey/ApiKeyServiceImpl.java new file mode 100644 index 00000000..d384bc41 --- /dev/null +++ b/src/main/java/com/coinbase/prime/apikey/ApiKeyServiceImpl.java @@ -0,0 +1,41 @@ +/* + * 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.apikey; + +import com.coinbase.core.common.HttpMethod; +import com.coinbase.core.service.CoinbaseServiceImpl; +import com.coinbase.prime.client.CoinbasePrimeClient; +import com.coinbase.prime.errors.CoinbasePrimeException; +import com.fasterxml.jackson.core.type.TypeReference; +import java.util.List; + +public class ApiKeyServiceImpl extends CoinbaseServiceImpl implements ApiKeyService { + public ApiKeyServiceImpl(CoinbasePrimeClient client) { + super(client); + } + + @Override + public RotateApiKeyResponse rotateApiKey(RotateApiKeyRequest request) + throws CoinbasePrimeException { + return this.request( + HttpMethod.POST, + "/api-keys/rotate", + request, + List.of(200), + new TypeReference() {}); + } +} diff --git a/src/main/java/com/coinbase/prime/apikey/RotateApiKeyRequest.java b/src/main/java/com/coinbase/prime/apikey/RotateApiKeyRequest.java new file mode 100644 index 00000000..a2ac752b --- /dev/null +++ b/src/main/java/com/coinbase/prime/apikey/RotateApiKeyRequest.java @@ -0,0 +1,59 @@ +/* + * 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.apikey; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Rotate API Key */ +public class RotateApiKeyRequest { + /** + * How long the old key remains active after the new key is approved, in seconds. Set to 0 for + * immediate expiry on approval. Cannot extend beyond the original key's expiry. + */ + @JsonProperty("duration_seconds") + private Long durationSeconds; + + public RotateApiKeyRequest() {} + + public RotateApiKeyRequest(Builder builder) { + this.durationSeconds = builder.durationSeconds; + } + + public Long getDurationSeconds() { + return durationSeconds; + } + + public void setDurationSeconds(Long durationSeconds) { + this.durationSeconds = durationSeconds; + } + + public static class Builder { + private Long durationSeconds; + + public Builder() {} + + public Builder durationSeconds(Long durationSeconds) { + this.durationSeconds = durationSeconds; + return this; + } + + public RotateApiKeyRequest build() throws CoinbaseClientException { + return new RotateApiKeyRequest(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/apikey/RotateApiKeyResponse.java b/src/main/java/com/coinbase/prime/apikey/RotateApiKeyResponse.java new file mode 100644 index 00000000..89ecb613 --- /dev/null +++ b/src/main/java/com/coinbase/prime/apikey/RotateApiKeyResponse.java @@ -0,0 +1,54 @@ +/* + * 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.apikey; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Rotate API Key */ +public class RotateApiKeyResponse { + /** + * Base64-encoded encrypted payload containing the new API key credentials. Decrypt using your + * current secret_key with HKDF-SHA256 + AES-256-GCM. + */ + @JsonProperty("encrypted_credentials") + private String encryptedCredentials; + + /** + * The Prime activity ID tracking the consensus approval for this rotation. Use with the + * Activities endpoints to monitor approval status. + */ + @JsonProperty("activity_id") + private String activityId; + + public RotateApiKeyResponse() {} + + public String getEncryptedCredentials() { + return encryptedCredentials; + } + + public void setEncryptedCredentials(String encryptedCredentials) { + this.encryptedCredentials = encryptedCredentials; + } + + public String getActivityId() { + return activityId; + } + + public void setActivityId(String activityId) { + this.activityId = activityId; + } +} diff --git a/src/main/java/com/coinbase/prime/factory/PrimeServiceFactory.java b/src/main/java/com/coinbase/prime/factory/PrimeServiceFactory.java index d3eb787b..bd36b279 100644 --- a/src/main/java/com/coinbase/prime/factory/PrimeServiceFactory.java +++ b/src/main/java/com/coinbase/prime/factory/PrimeServiceFactory.java @@ -24,6 +24,8 @@ import com.coinbase.prime.advancedtransfer.AdvancedTransferServiceImpl; import com.coinbase.prime.allocations.AllocationsService; import com.coinbase.prime.allocations.AllocationsServiceImpl; +import com.coinbase.prime.apikey.ApiKeyService; +import com.coinbase.prime.apikey.ApiKeyServiceImpl; import com.coinbase.prime.assets.AssetsService; import com.coinbase.prime.assets.AssetsServiceImpl; import com.coinbase.prime.balances.BalancesService; @@ -75,6 +77,10 @@ public static AllocationsService createAllocationsService(CoinbasePrimeClient cl return new AllocationsServiceImpl(client); } + public static ApiKeyService createApiKeyService(CoinbasePrimeClient client) { + return new ApiKeyServiceImpl(client); + } + public static AssetsService createAssetsService(CoinbasePrimeClient client) { return new AssetsServiceImpl(client); } diff --git a/src/main/java/com/coinbase/prime/financing/FinancingService.java b/src/main/java/com/coinbase/prime/financing/FinancingService.java index d0f9fd21..6180666c 100644 --- a/src/main/java/com/coinbase/prime/financing/FinancingService.java +++ b/src/main/java/com/coinbase/prime/financing/FinancingService.java @@ -278,4 +278,71 @@ GetCrossMarginPrimeOverviewResponse getCrossMarginPrimeOverview( */ GetMarketDataResponse getMarketData(GetMarketDataRequest request) throws CoinbaseClientException, CoinbasePrimeException; + + /** + * Get Conversion Fees. + * + *

Get your organization's stablecoin conversion fee tiers and month-to-date net conversion + * volume per currency. The organization is resolved from the authenticated API key, which must + * be organization-scoped. + * + * @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 + */ + GetConversionFeesResponse getConversionFees() + throws CoinbaseClientException, CoinbasePrimeException; + + /** + * Get Cross Margin Liquidation. + * + *

Gets detailed liquidation data for an XM customer. Returns the active or most recent + * liquidation by default. + * + * @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 + */ + GetXmLiquidationResponse getXmLiquidation(GetXmLiquidationRequest request) + throws CoinbaseClientException, CoinbasePrimeException; + + /** + * List Cross Margin Liquidations. + * + *

Lists historical liquidation records for an XM customer + * + * @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 + */ + ListXmLiquidationsResponse listXmLiquidations(ListXmLiquidationsRequest request) + throws CoinbaseClientException, CoinbasePrimeException; + + /** + * Get Entity Rewards Rate (Beta). + * + *

Returns the current rewards rate and available rate tiers for the entity. + * + * @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 + */ + GetEntityRewardsRateResponse getEntityRewardsRate(GetEntityRewardsRateRequest request) + throws CoinbaseClientException, CoinbasePrimeException; + + /** + * Get Portfolio Rewards Rate (Beta). + * + *

Returns the current rewards rate and available rate tiers for the 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 + */ + GetPortfolioRewardsRateResponse getPortfolioRewardsRate(GetPortfolioRewardsRateRequest request) + throws CoinbaseClientException, CoinbasePrimeException; } diff --git a/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java b/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java index 6249accb..bc55853d 100644 --- a/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java +++ b/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java @@ -247,4 +247,58 @@ public GetMarketDataResponse getMarketData(GetMarketDataRequest request) List.of(200), new TypeReference() {}); } + + @Override + public GetConversionFeesResponse getConversionFees() throws CoinbasePrimeException { + return this.request( + HttpMethod.GET, + "/conversion/fees", + null, + List.of(200), + new TypeReference() {}); + } + + @Override + public GetXmLiquidationResponse getXmLiquidation(GetXmLiquidationRequest request) + throws CoinbasePrimeException { + return this.request( + HttpMethod.GET, + String.format("/entities/%s/cross_margin/liquidation", request.getEntityId()), + request, + List.of(200), + new TypeReference() {}); + } + + @Override + public ListXmLiquidationsResponse listXmLiquidations(ListXmLiquidationsRequest request) + throws CoinbasePrimeException { + return this.request( + HttpMethod.GET, + String.format("/entities/%s/cross_margin/liquidations", request.getEntityId()), + request, + List.of(200), + new TypeReference() {}); + } + + @Override + public GetEntityRewardsRateResponse getEntityRewardsRate(GetEntityRewardsRateRequest request) + throws CoinbasePrimeException { + return this.request( + HttpMethod.GET, + String.format("/entities/%s/rewards/rate", request.getEntityId()), + request, + List.of(200), + new TypeReference() {}); + } + + @Override + public GetPortfolioRewardsRateResponse getPortfolioRewardsRate( + GetPortfolioRewardsRateRequest request) throws CoinbasePrimeException { + return this.request( + HttpMethod.GET, + String.format("/portfolios/%s/rewards/rate", request.getPortfolioId()), + request, + List.of(200), + new TypeReference() {}); + } } diff --git a/src/main/java/com/coinbase/prime/financing/GetConversionFeesResponse.java b/src/main/java/com/coinbase/prime/financing/GetConversionFeesResponse.java new file mode 100644 index 00000000..9aba9b03 --- /dev/null +++ b/src/main/java/com/coinbase/prime/financing/GetConversionFeesResponse.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.financing; + +import com.coinbase.prime.model.ConversionFee; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Get Conversion Fees */ +public class GetConversionFeesResponse { + @JsonProperty("fees") + private ConversionFee[] fees; + + public GetConversionFeesResponse() {} + + public ConversionFee[] getFees() { + return fees; + } + + public void setFees(ConversionFee[] fees) { + this.fees = fees; + } +} diff --git a/src/main/java/com/coinbase/prime/financing/GetEntityRewardsRateRequest.java b/src/main/java/com/coinbase/prime/financing/GetEntityRewardsRateRequest.java new file mode 100644 index 00000000..f1884d8b --- /dev/null +++ b/src/main/java/com/coinbase/prime/financing/GetEntityRewardsRateRequest.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.financing; + +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 Entity Rewards Rate (Beta) */ +public class GetEntityRewardsRateRequest { + @JsonProperty(required = true, value = "entity_id") + @JsonIgnore + private String entityId; + + public GetEntityRewardsRateRequest() {} + + public GetEntityRewardsRateRequest(Builder builder) { + this.entityId = builder.entityId; + } + + public String getEntityId() { + return entityId; + } + + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + public static class Builder { + private String entityId; + + public Builder() {} + + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; + } + + public GetEntityRewardsRateRequest build() throws CoinbaseClientException { + validate(); + return new GetEntityRewardsRateRequest(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/financing/GetEntityRewardsRateResponse.java b/src/main/java/com/coinbase/prime/financing/GetEntityRewardsRateResponse.java new file mode 100644 index 00000000..36b1080b --- /dev/null +++ b/src/main/java/com/coinbase/prime/financing/GetEntityRewardsRateResponse.java @@ -0,0 +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 + * + * 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.financing; + +import com.coinbase.prime.model.BetaRewardsRateTier; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Get Entity Rewards Rate (Beta) */ +public class GetEntityRewardsRateResponse { + @JsonProperty("current_rate") + private String currentRate; + + @JsonProperty("available_rates") + private BetaRewardsRateTier[] availableRates; + + public GetEntityRewardsRateResponse() {} + + public String getCurrentRate() { + return currentRate; + } + + public void setCurrentRate(String currentRate) { + this.currentRate = currentRate; + } + + public BetaRewardsRateTier[] getAvailableRates() { + return availableRates; + } + + public void setAvailableRates(BetaRewardsRateTier[] availableRates) { + this.availableRates = availableRates; + } +} diff --git a/src/main/java/com/coinbase/prime/financing/GetPortfolioRewardsRateRequest.java b/src/main/java/com/coinbase/prime/financing/GetPortfolioRewardsRateRequest.java new file mode 100644 index 00000000..2298bc6f --- /dev/null +++ b/src/main/java/com/coinbase/prime/financing/GetPortfolioRewardsRateRequest.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.financing; + +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 Rewards Rate (Beta) */ +public class GetPortfolioRewardsRateRequest { + @JsonProperty(required = true, value = "portfolio_id") + @JsonIgnore + private String portfolioId; + + public GetPortfolioRewardsRateRequest() {} + + public GetPortfolioRewardsRateRequest(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 GetPortfolioRewardsRateRequest build() throws CoinbaseClientException { + validate(); + return new GetPortfolioRewardsRateRequest(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/financing/GetPortfolioRewardsRateResponse.java b/src/main/java/com/coinbase/prime/financing/GetPortfolioRewardsRateResponse.java new file mode 100644 index 00000000..50fe3a38 --- /dev/null +++ b/src/main/java/com/coinbase/prime/financing/GetPortfolioRewardsRateResponse.java @@ -0,0 +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 + * + * 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.financing; + +import com.coinbase.prime.model.BetaRewardsRateTier; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Get Portfolio Rewards Rate (Beta) */ +public class GetPortfolioRewardsRateResponse { + @JsonProperty("current_rate") + private String currentRate; + + @JsonProperty("available_rates") + private BetaRewardsRateTier[] availableRates; + + public GetPortfolioRewardsRateResponse() {} + + public String getCurrentRate() { + return currentRate; + } + + public void setCurrentRate(String currentRate) { + this.currentRate = currentRate; + } + + public BetaRewardsRateTier[] getAvailableRates() { + return availableRates; + } + + public void setAvailableRates(BetaRewardsRateTier[] availableRates) { + this.availableRates = availableRates; + } +} diff --git a/src/main/java/com/coinbase/prime/financing/GetXmLiquidationRequest.java b/src/main/java/com/coinbase/prime/financing/GetXmLiquidationRequest.java new file mode 100644 index 00000000..2ada9314 --- /dev/null +++ b/src/main/java/com/coinbase/prime/financing/GetXmLiquidationRequest.java @@ -0,0 +1,86 @@ +/* + * 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.financing; + +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 Cross Margin Liquidation */ +public class GetXmLiquidationRequest { + /** XM customer Prime Entity ID */ + @JsonProperty(required = true, value = "entity_id") + @JsonIgnore + private String entityId; + + /** Financing liquidation UUID. If omitted, returns the active or most recent liquidation. */ + @JsonProperty("liquidation_id") + private String liquidationId; + + public GetXmLiquidationRequest() {} + + public GetXmLiquidationRequest(Builder builder) { + this.entityId = builder.entityId; + this.liquidationId = builder.liquidationId; + } + + public String getEntityId() { + return entityId; + } + + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + public String getLiquidationId() { + return liquidationId; + } + + public void setLiquidationId(String liquidationId) { + this.liquidationId = liquidationId; + } + + public static class Builder { + private String entityId; + private String liquidationId; + + public Builder() {} + + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; + } + + public Builder liquidationId(String liquidationId) { + this.liquidationId = liquidationId; + return this; + } + + public GetXmLiquidationRequest build() throws CoinbaseClientException { + validate(); + return new GetXmLiquidationRequest(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/financing/GetXmLiquidationResponse.java b/src/main/java/com/coinbase/prime/financing/GetXmLiquidationResponse.java new file mode 100644 index 00000000..6f559b48 --- /dev/null +++ b/src/main/java/com/coinbase/prime/financing/GetXmLiquidationResponse.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.financing; + +import com.coinbase.prime.model.XMLiquidationDetail; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Get Cross Margin Liquidation */ +public class GetXmLiquidationResponse { + @JsonProperty("liquidation") + private XMLiquidationDetail liquidation; + + public GetXmLiquidationResponse() {} + + public XMLiquidationDetail getLiquidation() { + return liquidation; + } + + public void setLiquidation(XMLiquidationDetail liquidation) { + this.liquidation = liquidation; + } +} diff --git a/src/main/java/com/coinbase/prime/financing/ListXmLiquidationsRequest.java b/src/main/java/com/coinbase/prime/financing/ListXmLiquidationsRequest.java new file mode 100644 index 00000000..88c83c96 --- /dev/null +++ b/src/main/java/com/coinbase/prime/financing/ListXmLiquidationsRequest.java @@ -0,0 +1,140 @@ +/* + * 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.financing; + +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.coinbase.prime.model.enums.XMLiquidationStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** List Cross Margin Liquidations */ +public class ListXmLiquidationsRequest extends PrimeListRequest { + /** XM customer Prime Entity ID */ + @JsonProperty(required = true, value = "entity_id") + @JsonIgnore + private String entityId; + + @JsonProperty("status") + private XMLiquidationStatus status; + + @JsonProperty("start_time") + private String startTime; + + @JsonProperty("end_time") + private String endTime; + + public ListXmLiquidationsRequest() {} + + public ListXmLiquidationsRequest(Builder builder) { + super(builder.cursor, builder.sortDirection, builder.limit); + this.entityId = builder.entityId; + this.status = builder.status; + this.startTime = builder.startTime; + this.endTime = builder.endTime; + } + + public String getEntityId() { + return entityId; + } + + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + public XMLiquidationStatus getStatus() { + return status; + } + + public void setStatus(XMLiquidationStatus status) { + this.status = status; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public static class Builder { + private String entityId; + private XMLiquidationStatus status; + private String startTime; + private String endTime; + private String cursor; + private SortDirection sortDirection; + private Integer limit; + + public Builder() {} + + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; + } + + public Builder status(XMLiquidationStatus status) { + this.status = status; + return this; + } + + public Builder startTime(String startTime) { + this.startTime = startTime; + return this; + } + + public Builder endTime(String endTime) { + this.endTime = endTime; + 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 ListXmLiquidationsRequest build() throws CoinbaseClientException { + validate(); + return new ListXmLiquidationsRequest(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/financing/ListXmLiquidationsResponse.java b/src/main/java/com/coinbase/prime/financing/ListXmLiquidationsResponse.java new file mode 100644 index 00000000..3eb42c44 --- /dev/null +++ b/src/main/java/com/coinbase/prime/financing/ListXmLiquidationsResponse.java @@ -0,0 +1,48 @@ +/* + * 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.financing; + +import com.coinbase.prime.common.Pagination; +import com.coinbase.prime.model.XMLiquidationSummary; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** List Cross Margin Liquidations */ +public class ListXmLiquidationsResponse { + @JsonProperty("liquidations") + private XMLiquidationSummary[] liquidations; + + @JsonProperty("pagination") + private Pagination pagination; + + public ListXmLiquidationsResponse() {} + + public XMLiquidationSummary[] getLiquidations() { + return liquidations; + } + + public void setLiquidations(XMLiquidationSummary[] liquidations) { + this.liquidations = liquidations; + } + + public Pagination getPagination() { + return pagination; + } + + public void setPagination(Pagination pagination) { + this.pagination = pagination; + } +} diff --git a/src/main/java/com/coinbase/prime/futures/FuturesService.java b/src/main/java/com/coinbase/prime/futures/FuturesService.java index ab922cae..a9fef98c 100644 --- a/src/main/java/com/coinbase/prime/futures/FuturesService.java +++ b/src/main/java/com/coinbase/prime/futures/FuturesService.java @@ -166,4 +166,33 @@ CancelEntityFuturesSweepResponse cancelEntityFuturesSweep(CancelEntityFuturesSwe */ GetFcmEquityResponse getFcmEquity(GetFcmEquityRequest request) throws CoinbaseClientException, CoinbasePrimeException; + + /** + * Get Portfolio Derivatives Currency Summary. + * + *

Retrieve per-currency international derivatives balances for a given portfolio. US Futures + * balances roll up to a single clearing account per entity rather than per portfolio, and are + * available from the entity futures balance summary and risk limits endpoints instead. + * + * @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 + */ + GetDerivativesCurrencySummaryResponse getDerivativesCurrencySummary( + GetDerivativesCurrencySummaryRequest request) + throws CoinbaseClientException, CoinbasePrimeException; + + /** + * List Portfolio Derivative Positions. + * + *

Retrieve all active derivative positions 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 + */ + GetDerivativePositionsResponse getDerivativePositions(GetDerivativePositionsRequest request) + throws CoinbaseClientException, CoinbasePrimeException; } diff --git a/src/main/java/com/coinbase/prime/futures/FuturesServiceImpl.java b/src/main/java/com/coinbase/prime/futures/FuturesServiceImpl.java index 47f31343..c63580a4 100644 --- a/src/main/java/com/coinbase/prime/futures/FuturesServiceImpl.java +++ b/src/main/java/com/coinbase/prime/futures/FuturesServiceImpl.java @@ -148,4 +148,26 @@ public GetFcmEquityResponse getFcmEquity(GetFcmEquityRequest request) List.of(200), new TypeReference() {}); } + + @Override + public GetDerivativesCurrencySummaryResponse getDerivativesCurrencySummary( + GetDerivativesCurrencySummaryRequest request) throws CoinbasePrimeException { + return this.request( + HttpMethod.GET, + String.format("/portfolios/%s/derivatives/currency_summary", request.getPortfolioId()), + request, + List.of(200), + new TypeReference() {}); + } + + @Override + public GetDerivativePositionsResponse getDerivativePositions( + GetDerivativePositionsRequest request) throws CoinbasePrimeException { + return this.request( + HttpMethod.GET, + String.format("/portfolios/%s/derivatives/positions", request.getPortfolioId()), + request, + List.of(200), + new TypeReference() {}); + } } diff --git a/src/main/java/com/coinbase/prime/futures/GetDerivativePositionsRequest.java b/src/main/java/com/coinbase/prime/futures/GetDerivativePositionsRequest.java new file mode 100644 index 00000000..064fe3ac --- /dev/null +++ b/src/main/java/com/coinbase/prime/futures/GetDerivativePositionsRequest.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.futures; + +import 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; + +/** List Portfolio Derivative Positions */ +public class GetDerivativePositionsRequest { + @JsonProperty(required = true, value = "portfolio_id") + @JsonIgnore + private String portfolioId; + + @JsonProperty("product_id") + private String productId; + + public GetDerivativePositionsRequest() {} + + public GetDerivativePositionsRequest(Builder builder) { + this.portfolioId = builder.portfolioId; + this.productId = builder.productId; + } + + 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 static class Builder { + private String portfolioId; + private String productId; + + public Builder() {} + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder productId(String productId) { + this.productId = productId; + return this; + } + + public GetDerivativePositionsRequest build() throws CoinbaseClientException { + validate(); + return new GetDerivativePositionsRequest(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/futures/GetDerivativePositionsResponse.java b/src/main/java/com/coinbase/prime/futures/GetDerivativePositionsResponse.java new file mode 100644 index 00000000..e37bb0eb --- /dev/null +++ b/src/main/java/com/coinbase/prime/futures/GetDerivativePositionsResponse.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.futures; + +import com.coinbase.prime.model.DerivativePosition; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** List Portfolio Derivative Positions */ +public class GetDerivativePositionsResponse { + @JsonProperty("positions") + private DerivativePosition[] positions; + + public GetDerivativePositionsResponse() {} + + public DerivativePosition[] getPositions() { + return positions; + } + + public void setPositions(DerivativePosition[] positions) { + this.positions = positions; + } +} diff --git a/src/main/java/com/coinbase/prime/futures/GetDerivativesCurrencySummaryRequest.java b/src/main/java/com/coinbase/prime/futures/GetDerivativesCurrencySummaryRequest.java new file mode 100644 index 00000000..e387d882 --- /dev/null +++ b/src/main/java/com/coinbase/prime/futures/GetDerivativesCurrencySummaryRequest.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.futures; + +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 Derivatives Currency Summary */ +public class GetDerivativesCurrencySummaryRequest { + @JsonProperty(required = true, value = "portfolio_id") + @JsonIgnore + private String portfolioId; + + public GetDerivativesCurrencySummaryRequest() {} + + public GetDerivativesCurrencySummaryRequest(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 GetDerivativesCurrencySummaryRequest build() throws CoinbaseClientException { + validate(); + return new GetDerivativesCurrencySummaryRequest(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/futures/GetDerivativesCurrencySummaryResponse.java b/src/main/java/com/coinbase/prime/futures/GetDerivativesCurrencySummaryResponse.java new file mode 100644 index 00000000..15e6fdb3 --- /dev/null +++ b/src/main/java/com/coinbase/prime/futures/GetDerivativesCurrencySummaryResponse.java @@ -0,0 +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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.futures; + +import com.coinbase.prime.model.DerivativesCurrencyBalance; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Get Portfolio Derivatives Currency Summary */ +public class GetDerivativesCurrencySummaryResponse { + @JsonProperty("portfolio_id") + private String portfolioId; + + @JsonProperty("balances") + private DerivativesCurrencyBalance[] balances; + + public GetDerivativesCurrencySummaryResponse() {} + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public DerivativesCurrencyBalance[] getBalances() { + return balances; + } + + public void setBalances(DerivativesCurrencyBalance[] balances) { + this.balances = balances; + } +} diff --git a/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java b/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java index 96890571..0b12374f 100644 --- a/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java +++ b/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java @@ -115,6 +115,10 @@ public class CreateOrderRequest { @JsonProperty("is_raise_exact") private boolean isRaiseExact; + /** Buy Exact order flag */ + @JsonProperty("is_buy_exact") + private boolean isBuyExact; + /** Historical percentage of volume */ @JsonProperty("historical_pov") private String historicalPov; @@ -174,6 +178,7 @@ public CreateOrderRequest(Builder builder) { this.displayQuoteSize = builder.displayQuoteSize; this.displayBaseSize = builder.displayBaseSize; this.isRaiseExact = builder.isRaiseExact; + this.isBuyExact = builder.isBuyExact; this.historicalPov = builder.historicalPov; this.stopPrice = builder.stopPrice; this.settlCurrency = builder.settlCurrency; @@ -303,6 +308,14 @@ public void setRaiseExact(boolean isRaiseExact) { this.isRaiseExact = isRaiseExact; } + public boolean isBuyExact() { + return isBuyExact; + } + + public void setBuyExact(boolean isBuyExact) { + this.isBuyExact = isBuyExact; + } + public String getHistoricalPov() { return historicalPov; } @@ -375,6 +388,7 @@ public static class Builder { private String displayQuoteSize; private String displayBaseSize; private boolean isRaiseExact; + private boolean isBuyExact; private String historicalPov; private String stopPrice; private String settlCurrency; @@ -460,6 +474,11 @@ public Builder isRaiseExact(boolean isRaiseExact) { return this; } + public Builder isBuyExact(boolean isBuyExact) { + this.isBuyExact = isBuyExact; + return this; + } + public Builder historicalPov(String historicalPov) { this.historicalPov = historicalPov; return this; diff --git a/src/main/java/com/coinbase/prime/orders/GetOrderPreviewRequest.java b/src/main/java/com/coinbase/prime/orders/GetOrderPreviewRequest.java index f5ef3bbc..d2397609 100644 --- a/src/main/java/com/coinbase/prime/orders/GetOrderPreviewRequest.java +++ b/src/main/java/com/coinbase/prime/orders/GetOrderPreviewRequest.java @@ -62,6 +62,10 @@ public class GetOrderPreviewRequest { @JsonProperty("is_raise_exact") private Boolean isRaiseExact; + /** Buy Exact order flag */ + @JsonProperty("is_buy_exact") + private Boolean isBuyExact; + @JsonProperty("historical_pov") private String historicalPov; @@ -103,6 +107,7 @@ public GetOrderPreviewRequest(Builder builder) { this.expiryTime = builder.expiryTime; this.timeInForce = builder.timeInForce; this.isRaiseExact = builder.isRaiseExact; + this.isBuyExact = builder.isBuyExact; this.historicalPov = builder.historicalPov; this.stopPrice = builder.stopPrice; this.settlCurrency = builder.settlCurrency; @@ -202,6 +207,14 @@ public void setIsRaiseExact(Boolean isRaiseExact) { this.isRaiseExact = isRaiseExact; } + public Boolean getIsBuyExact() { + return isBuyExact; + } + + public void setIsBuyExact(Boolean isBuyExact) { + this.isBuyExact = isBuyExact; + } + public String getHistoricalPov() { return historicalPov; } @@ -286,6 +299,7 @@ public static class Builder { private String expiryTime; private TimeInForceType timeInForce; private Boolean isRaiseExact; + private Boolean isBuyExact; private String historicalPov; private String stopPrice; private String settlCurrency; @@ -353,6 +367,11 @@ public Builder isRaiseExact(Boolean isRaiseExact) { return this; } + public Builder isBuyExact(Boolean isBuyExact) { + this.isBuyExact = isBuyExact; + return this; + } + public Builder historicalPov(String historicalPov) { this.historicalPov = historicalPov; return this; diff --git a/src/main/java/com/coinbase/prime/orders/GetOrderPreviewResponse.java b/src/main/java/com/coinbase/prime/orders/GetOrderPreviewResponse.java index c737eef4..d84ef210 100644 --- a/src/main/java/com/coinbase/prime/orders/GetOrderPreviewResponse.java +++ b/src/main/java/com/coinbase/prime/orders/GetOrderPreviewResponse.java @@ -77,6 +77,10 @@ public class GetOrderPreviewResponse { @JsonProperty("is_raise_exact") private Boolean isRaiseExact; + /** Buy Exact order flag */ + @JsonProperty("is_buy_exact") + private Boolean isBuyExact; + @JsonProperty("stop_price") private String stopPrice; @@ -235,6 +239,14 @@ public void setIsRaiseExact(Boolean isRaiseExact) { this.isRaiseExact = isRaiseExact; } + public Boolean getIsBuyExact() { + return isBuyExact; + } + + public void setIsBuyExact(Boolean isBuyExact) { + this.isBuyExact = isBuyExact; + } + public String getStopPrice() { return stopPrice; } diff --git a/src/main/java/com/coinbase/prime/utils/Constants.java b/src/main/java/com/coinbase/prime/utils/Constants.java index cdc27aa3..3d0784e7 100644 --- a/src/main/java/com/coinbase/prime/utils/Constants.java +++ b/src/main/java/com/coinbase/prime/utils/Constants.java @@ -23,7 +23,7 @@ public class Constants { public static final String CB_ACCESS_TIMESTAMP_HEADER = "X-CB-ACCESS-TIMESTAMP"; public static final String CB_USER_AGENT_HEADER = "User-Agent"; public static final String CB_PRIME_BASE_URL = "https://api.prime.coinbase.com/v1"; - public static final String SDK_VERSION = "1.10.3"; + public static final String SDK_VERSION = "1.11.0"; /** * Replaces a trailing {@code /vN} segment with {@code /}{@code version}. Used when an endpoint is diff --git a/src/test/java/com/coinbase/prime/apikey/ApiKeyServiceSerializationTest.java b/src/test/java/com/coinbase/prime/apikey/ApiKeyServiceSerializationTest.java new file mode 100644 index 00000000..d7695841 --- /dev/null +++ b/src/test/java/com/coinbase/prime/apikey/ApiKeyServiceSerializationTest.java @@ -0,0 +1,64 @@ +/* + * 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.apikey; + +import static org.junit.jupiter.api.Assertions.*; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class ApiKeyServiceSerializationTest { + + private ObjectMapper objectMapper; + + @BeforeEach + public void setUp() { + objectMapper = + new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + } + + @Test + public void testRotateApiKeyRequestEmptyBuilder() throws JsonProcessingException { + RotateApiKeyRequest request = new RotateApiKeyRequest.Builder().build(); + assertNotNull(request); + assertNull(request.getDurationSeconds()); + } + + @Test + public void testRotateApiKeyRequestSerialization() throws JsonProcessingException { + RotateApiKeyRequest request = + new RotateApiKeyRequest.Builder().durationSeconds(3600L).build(); + String json = objectMapper.writeValueAsString(request); + assertTrue(json.contains("\"duration_seconds\":3600")); + } + + @Test + public void testRotateApiKeyResponseDeserialization() throws JsonProcessingException { + String json = + "{" + + "\"encrypted_credentials\":\"abc123\"," + + "\"activity_id\":\"e8bbed13-fa33-41de-86d5-4335d8f08166\"" + + "}"; + RotateApiKeyResponse response = objectMapper.readValue(json, RotateApiKeyResponse.class); + assertNotNull(response); + assertEquals("abc123", response.getEncryptedCredentials()); + assertEquals("e8bbed13-fa33-41de-86d5-4335d8f08166", response.getActivityId()); + } +} diff --git a/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java b/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java index f28a633f..45b3a688 100644 --- a/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java +++ b/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java @@ -489,4 +489,81 @@ public void testListTradeFinanceObligationsResponseDeserialization() assertNotNull(response.getObligations()); assertEquals(2, response.getObligations().length); } + + @Test + public void testGetConversionFeesResponseDeserialization() throws JsonProcessingException { + String json = + "{" + + "\"fees\":[" + + "{\"from_currency\":\"USDC\",\"to_currency\":\"USD\",\"net_conversion_volume_mtd\":\"100.00\"}" + + "]" + + "}"; + GetConversionFeesResponse response = + objectMapper.readValue(json, GetConversionFeesResponse.class); + assertNotNull(response); + assertEquals(1, response.getFees().length); + assertEquals("USDC", response.getFees()[0].getFromCurrency()); + } + + @Test + public void testGetXmLiquidationRequestOmitsEntityId() throws JsonProcessingException { + GetXmLiquidationRequest request = + new GetXmLiquidationRequest.Builder() + .entityId("entity-123") + .liquidationId("liq-1") + .build(); + String json = objectMapper.writeValueAsString(request); + assertTrue(json.contains("\"liquidation_id\":\"liq-1\"")); + assertFalse(json.contains("entity_id")); + } + + @Test + public void testGetXmLiquidationResponseDeserialization() throws JsonProcessingException { + String json = "{\"liquidation\":{\"liquidation_id\":\"liq-1\"}}"; + GetXmLiquidationResponse response = + objectMapper.readValue(json, GetXmLiquidationResponse.class); + assertNotNull(response.getLiquidation()); + assertEquals("liq-1", response.getLiquidation().getLiquidationId()); + } + + @Test + public void testListXmLiquidationsRequestSerialization() throws JsonProcessingException { + ListXmLiquidationsRequest request = + new ListXmLiquidationsRequest.Builder() + .entityId("entity-123") + .status(com.coinbase.prime.model.enums.XMLiquidationStatus.XM_LIQUIDATION_STATUS_LIQUIDATED) + .build(); + String json = objectMapper.writeValueAsString(request); + assertTrue(json.contains("\"status\":\"XM_LIQUIDATION_STATUS_LIQUIDATED\"")); + assertFalse(json.contains("entity_id")); + } + + @Test + public void testListXmLiquidationsResponseDeserialization() throws JsonProcessingException { + String json = "{\"liquidations\":[{\"liquidation_id\":\"liq-1\"}]}"; + ListXmLiquidationsResponse response = + objectMapper.readValue(json, ListXmLiquidationsResponse.class); + assertEquals(1, response.getLiquidations().length); + assertEquals("liq-1", response.getLiquidations()[0].getLiquidationId()); + } + + @Test + public void testGetEntityRewardsRateResponseDeserialization() throws JsonProcessingException { + String json = + "{\"current_rate\":\"0.045\",\"available_rates\":[{\"rate\":\"0.045\",\"lower_limit\":\"0\"}]}"; + GetEntityRewardsRateResponse response = + objectMapper.readValue(json, GetEntityRewardsRateResponse.class); + assertEquals("0.045", response.getCurrentRate()); + assertEquals(1, response.getAvailableRates().length); + assertEquals("0.045", response.getAvailableRates()[0].getRate()); + } + + @Test + public void testGetPortfolioRewardsRateResponseDeserialization() throws JsonProcessingException { + String json = "{\"current_rate\":\"0.03\",\"available_rates\":[]}"; + GetPortfolioRewardsRateResponse response = + objectMapper.readValue(json, GetPortfolioRewardsRateResponse.class); + assertEquals("0.03", response.getCurrentRate()); + assertEquals(0, response.getAvailableRates().length); + } } diff --git a/src/test/java/com/coinbase/prime/futures/FuturesServiceSerializationTest.java b/src/test/java/com/coinbase/prime/futures/FuturesServiceSerializationTest.java index b28d0182..94b14e50 100644 --- a/src/test/java/com/coinbase/prime/futures/FuturesServiceSerializationTest.java +++ b/src/test/java/com/coinbase/prime/futures/FuturesServiceSerializationTest.java @@ -325,4 +325,47 @@ public void testGetFcmEquityResponseDeserialization() throws JsonProcessingExcep assertEquals("105000.00", response.getEodAccountEquity()); assertEquals("500.00", response.getEodUnrealizedPnl()); } + + @Test + public void testGetDerivativesCurrencySummaryRequestConstruction() { + GetDerivativesCurrencySummaryRequest request = + new GetDerivativesCurrencySummaryRequest.Builder().portfolioId("portfolio-123").build(); + assertNotNull(request); + assertEquals("portfolio-123", request.getPortfolioId()); + } + + @Test + public void testGetDerivativesCurrencySummaryResponseDeserialization() + throws JsonProcessingException { + String json = + "{" + + "\"portfolio_id\":\"portfolio-123\"," + + "\"balances\":[{\"currency\":\"USD\",\"balance\":\"1000.00\"}]" + + "}"; + GetDerivativesCurrencySummaryResponse response = + objectMapper.readValue(json, GetDerivativesCurrencySummaryResponse.class); + assertEquals("portfolio-123", response.getPortfolioId()); + assertEquals("USD", response.getBalances()[0].getCurrency()); + } + + @Test + public void testGetDerivativePositionsRequestSerialization() throws JsonProcessingException { + GetDerivativePositionsRequest request = + new GetDerivativePositionsRequest.Builder() + .portfolioId("portfolio-123") + .productId("BTC-31JAN24-CDE") + .build(); + String json = objectMapper.writeValueAsString(request); + assertTrue(json.contains("\"product_id\":\"BTC-31JAN24-CDE\"")); + assertFalse(json.contains("portfolio_id")); + } + + @Test + public void testGetDerivativePositionsResponseDeserialization() throws JsonProcessingException { + String json = "{\"positions\":[{\"product_id\":\"BTC-31JAN24-CDE\",\"number_of_contracts\":\"10\"}]}"; + GetDerivativePositionsResponse response = + objectMapper.readValue(json, GetDerivativePositionsResponse.class); + assertEquals(1, response.getPositions().length); + assertEquals("BTC-31JAN24-CDE", response.getPositions()[0].getProductId()); + } } diff --git a/src/test/java/com/coinbase/prime/integration/FinancingIT.java b/src/test/java/com/coinbase/prime/integration/FinancingIT.java index 600b0a65..ab4a9448 100644 --- a/src/test/java/com/coinbase/prime/integration/FinancingIT.java +++ b/src/test/java/com/coinbase/prime/integration/FinancingIT.java @@ -354,4 +354,55 @@ public void testGetPortfolioWithdrawalPowerWithSymbol() throws Exception { .build()); assertNotNull(response); } + + @Test + public void testGetConversionFees() throws Exception { + FinancingService service = PrimeServiceFactory.createFinancingService(client); + GetConversionFeesResponse response = service.getConversionFees(); + assertNotNull(response); + } + + @Test + public void testGetXmLiquidation() throws Exception { + assumeTrue( + entityId != null && !entityId.isEmpty(), "Skipping: COINBASE_PRIME_ENTITY_ID not set"); + FinancingService service = PrimeServiceFactory.createFinancingService(client); + GetXmLiquidationResponse response = + service.getXmLiquidation(new GetXmLiquidationRequest.Builder().entityId(entityId).build()); + assertNotNull(response); + } + + @Test + public void testListXmLiquidations() throws Exception { + assumeTrue( + entityId != null && !entityId.isEmpty(), "Skipping: COINBASE_PRIME_ENTITY_ID not set"); + FinancingService service = PrimeServiceFactory.createFinancingService(client); + ListXmLiquidationsResponse response = + service.listXmLiquidations( + new ListXmLiquidationsRequest.Builder().entityId(entityId).build()); + assertNotNull(response); + } + + @Test + public void testGetEntityRewardsRate() throws Exception { + assumeTrue( + entityId != null && !entityId.isEmpty(), "Skipping: COINBASE_PRIME_ENTITY_ID not set"); + FinancingService service = PrimeServiceFactory.createFinancingService(client); + GetEntityRewardsRateResponse response = + service.getEntityRewardsRate( + new GetEntityRewardsRateRequest.Builder().entityId(entityId).build()); + assertNotNull(response); + } + + @Test + public void testGetPortfolioRewardsRate() throws Exception { + assumeTrue( + portfolioId != null && !portfolioId.isEmpty(), + "Skipping: COINBASE_PRIME_PORTFOLIO_ID not set"); + FinancingService service = PrimeServiceFactory.createFinancingService(client); + GetPortfolioRewardsRateResponse response = + service.getPortfolioRewardsRate( + new GetPortfolioRewardsRateRequest.Builder().portfolioId(portfolioId).build()); + assertNotNull(response); + } } diff --git a/src/test/java/com/coinbase/prime/integration/FuturesIT.java b/src/test/java/com/coinbase/prime/integration/FuturesIT.java index 6340f052..abd3b241 100644 --- a/src/test/java/com/coinbase/prime/integration/FuturesIT.java +++ b/src/test/java/com/coinbase/prime/integration/FuturesIT.java @@ -116,4 +116,28 @@ public void testGetFcmEquity() throws Exception { service.getFcmEquity(new GetFcmEquityRequest.Builder().entityId(entityId).build()); assertNotNull(response); } + + @Test + public void testGetDerivativesCurrencySummary() throws Exception { + assumeTrue( + portfolioId != null && !portfolioId.isEmpty(), + "Skipping: COINBASE_PRIME_PORTFOLIO_ID not set"); + FuturesService service = PrimeServiceFactory.createFuturesService(client); + GetDerivativesCurrencySummaryResponse response = + service.getDerivativesCurrencySummary( + new GetDerivativesCurrencySummaryRequest.Builder().portfolioId(portfolioId).build()); + assertNotNull(response); + } + + @Test + public void testGetDerivativePositions() throws Exception { + assumeTrue( + portfolioId != null && !portfolioId.isEmpty(), + "Skipping: COINBASE_PRIME_PORTFOLIO_ID not set"); + FuturesService service = PrimeServiceFactory.createFuturesService(client); + GetDerivativePositionsResponse response = + service.getDerivativePositions( + new GetDerivativePositionsRequest.Builder().portfolioId(portfolioId).build()); + assertNotNull(response); + } } diff --git a/src/test/java/com/coinbase/prime/integration/VersionHeaderIntegrationTest.java b/src/test/java/com/coinbase/prime/integration/VersionHeaderIntegrationTest.java index 186b8a65..87adaf4d 100644 --- a/src/test/java/com/coinbase/prime/integration/VersionHeaderIntegrationTest.java +++ b/src/test/java/com/coinbase/prime/integration/VersionHeaderIntegrationTest.java @@ -47,9 +47,9 @@ public void testVersionHeaderMatchesPomVersion() throws CoinbaseClientException assertNotNull(userAgent, "User-Agent header should be present"); assertEquals( - "prime-sdk-java/1.10.3", + "prime-sdk-java/1.11.0", userAgent, - "User-Agent should contain 'prime-sdk-java/1.10.3' to match pom.xml version"); + "User-Agent should contain 'prime-sdk-java/1.11.0' to match pom.xml version"); // Additional verification: Ensure the SDK_VERSION constant is used correctly String expectedUserAgent = String.format("prime-sdk-java/%s", Constants.SDK_VERSION); @@ -63,9 +63,9 @@ public void testVersionHeaderMatchesPomVersion() throws CoinbaseClientException public void testSdkVersionConstantMatches() { // Verify that the SDK_VERSION constant has been updated correctly assertEquals( - "1.10.3", + "1.11.0", Constants.SDK_VERSION, - "SDK_VERSION constant should be '1.10.3' to match pom.xml version"); + "SDK_VERSION constant should be '1.11.0' to match pom.xml version"); } @Test @@ -84,7 +84,7 @@ public void testAllApiCallsWillIncludeVersionHeader() throws CoinbaseClientExcep String userAgent = headers.get(Constants.CB_USER_AGENT_HEADER); assertEquals( - "prime-sdk-java/1.10.3", + "prime-sdk-java/1.11.0", userAgent, "All API calls should include the correct version header, failed for path: " + path); } diff --git a/src/test/java/com/coinbase/prime/utils/ConstantsTest.java b/src/test/java/com/coinbase/prime/utils/ConstantsTest.java index 69cdd07e..99dd4943 100644 --- a/src/test/java/com/coinbase/prime/utils/ConstantsTest.java +++ b/src/test/java/com/coinbase/prime/utils/ConstantsTest.java @@ -25,7 +25,7 @@ public class ConstantsTest { @Test public void testSdkVersionIsCorrect() { assertEquals( - "1.10.3", Constants.SDK_VERSION, "SDK_VERSION should match the version in pom.xml"); + "1.11.0", Constants.SDK_VERSION, "SDK_VERSION should match the version in pom.xml"); } @Test From 317291ada36044c237e7ba11872bf85bb46c1a4f Mon Sep 17 00:00:00 2001 From: Carl Fluke Date: Tue, 1 Sep 2026 16:32:17 -0400 Subject: [PATCH 3/7] fmt Co-authored-by: Cursor --- .../prime/financing/FinancingService.java | 4 +- .../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/BetaRewardsRateTier.java | 144 +- .../prime/model/BlindMatchMetadata.java | 155 +- .../prime/model/BlockchainAddress.java | 110 +- .../com/coinbase/prime/model/BuyingPower.java | 183 ++- .../java/com/coinbase/prime/model/Candle.java | 202 ++- .../com/coinbase/prime/model/ComboLeg.java | 111 +- .../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/ConversionFee.java | 163 +- .../prime/model/ConversionFeeTier.java | 117 +- .../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 +++-- .../prime/model/CustomStablecoinAsset.java | 48 +- .../model/CustomStablecoinRewardDetails.java | 114 +- .../com/coinbase/prime/model/DateOfBirth.java | 113 +- .../com/coinbase/prime/model/DefiBalance.java | 107 +- .../prime/model/DerivativePosition.java | 426 +++--- .../model/DerivativesCurrencyBalance.java | 390 +++-- .../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 | 508 +++---- .../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 +- .../prime/model/OptionProductDetails.java | 471 +++--- .../coinbase/prime/model/OptionsDetails.java | 212 ++- .../java/com/coinbase/prime/model/Order.java | 1333 ++++++++--------- .../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 +++-- .../prime/model/PriceIncrementStep.java | 93 +- .../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 | 478 +++--- ...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 | 949 ++++++------ .../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 | 393 ++--- .../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 | 130 +- .../prime/model/WalletStakingMetadata.java | 63 +- .../prime/model/WalletUnstakeInputs.java | 129 +- .../coinbase/prime/model/WithdrawalPower.java | 79 +- .../prime/model/XMLiquidatedAsset.java | 181 ++- .../prime/model/XMLiquidationDetail.java | 358 +++-- .../prime/model/XMLiquidationSummary.java | 259 ++-- .../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 - .../model/enums/BetaRewardsRateTierType.java | 1 - .../prime/model/enums/CandlesGranularity.java | 5 +- .../prime/model/enums/ContractExpiryType.java | 15 +- .../model/enums/CustodyActivityType.java | 1 - .../model/enums/DerivativeProductType.java | 56 +- .../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 | 28 +- .../prime/model/enums/FcmPositionSide.java | 1 - .../enums/FcmTradingSessionClosedReason.java | 21 +- .../model/enums/FcmTradingSessionState.java | 32 +- .../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 - .../prime/model/enums/OptionType.java | 15 +- .../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 | 19 +- .../coinbase/prime/model/enums/RateType.java | 1 - .../prime/model/enums/RewardSubtype.java | 57 +- .../prime/model/enums/RiskManagementType.java | 15 +- .../model/enums/SecondaryPermission.java | 19 +- .../prime/model/enums/SettlementModel.java | 14 +- .../prime/model/enums/SettlementPeriod.java | 25 +- .../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 | 204 +-- .../model/enums/TransferLocationType.java | 36 +- .../prime/model/enums/TravelRuleStatus.java | 5 +- .../model/enums/TravelRuleWalletType.java | 15 +- .../prime/model/enums/UnstakeType.java | 1 - .../coinbase/prime/model/enums/UserRole.java | 61 +- .../prime/model/enums/ValidatorProvider.java | 5 +- .../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 +- .../ApiKeyServiceSerializationTest.java | 3 +- .../FinancingServiceSerializationTest.java | 8 +- .../FuturesServiceSerializationTest.java | 3 +- 231 files changed, 16842 insertions(+), 17755 deletions(-) diff --git a/src/main/java/com/coinbase/prime/financing/FinancingService.java b/src/main/java/com/coinbase/prime/financing/FinancingService.java index 6180666c..d2d1f341 100644 --- a/src/main/java/com/coinbase/prime/financing/FinancingService.java +++ b/src/main/java/com/coinbase/prime/financing/FinancingService.java @@ -283,8 +283,8 @@ GetMarketDataResponse getMarketData(GetMarketDataRequest request) * Get Conversion Fees. * *

Get your organization's stablecoin conversion fee tiers and month-to-date net conversion - * volume per currency. The organization is resolved from the authenticated API key, which must - * be organization-scoped. + * volume per currency. The organization is resolved from the authenticated API key, which must be + * organization-scoped. * * @return the response payload for this operation * @throws CoinbaseClientException if the request fails client-side validation diff --git a/src/main/java/com/coinbase/prime/model/Accrual.java b/src/main/java/com/coinbase/prime/model/Accrual.java index 58fc4be7..420d8d61 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 79ea8b03..ad4c7a7a 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 348c2b7a..19de3627 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 f74ca5a9..b6c33416 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 40a95715..5a2ae77a 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 05a0ab05..a3451607 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 c5bc51b0..f9848a64 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 3d33f1fb..361e8238 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 c977cc8a..38fa3f6a 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 6177759d..fcad19e2 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 98f2588b..c1bfb532 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 6bc495c8..3d8f2a50 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 6ec60f24..7f64ceaf 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 9bb40291..16f8af27 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 86462a25..f7a6a375 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 ffbc3b03..bab77eb9 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 bde8a45e..32d43bf5 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 668152a9..afd769a3 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/BetaRewardsRateTier.java b/src/main/java/com/coinbase/prime/model/BetaRewardsRateTier.java index 1a2da3e3..2c85a3dc 100644 --- a/src/main/java/com/coinbase/prime/model/BetaRewardsRateTier.java +++ b/src/main/java/com/coinbase/prime/model/BetaRewardsRateTier.java @@ -17,99 +17,97 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.BetaRewardsRateTierType; import com.fasterxml.jackson.annotation.JsonProperty; public class BetaRewardsRateTier { - /** - * Rate for this tier. - */ - private String rate; + /** Rate for this tier. */ + private String rate; - /** - * Lower bound of the tier's qualifying criteria (e.g. balance floor). - */ - @JsonProperty("lower_limit") - private String lowerLimit; + /** Lower bound of the tier's qualifying criteria (e.g. balance floor). */ + @JsonProperty("lower_limit") + private String lowerLimit; - /** - * Upper bound of the tier's qualifying criteria. - */ - @JsonProperty("upper_limit") - private String upperLimit; + /** Upper bound of the tier's qualifying criteria. */ + @JsonProperty("upper_limit") + private String upperLimit; - @JsonProperty("criteria_type") - private BetaRewardsRateTierType criteriaType; + @JsonProperty("criteria_type") + private BetaRewardsRateTierType criteriaType; - public BetaRewardsRateTier() { - } + public BetaRewardsRateTier() {} - public BetaRewardsRateTier(Builder builder) { - this.rate = builder.rate; - this.lowerLimit = builder.lowerLimit; - this.upperLimit = builder.upperLimit; - this.criteriaType = builder.criteriaType; - } - public String getRate() { - return rate; - } + public BetaRewardsRateTier(Builder builder) { + this.rate = builder.rate; + this.lowerLimit = builder.lowerLimit; + this.upperLimit = builder.upperLimit; + this.criteriaType = builder.criteriaType; + } - public void setRate(String rate) { - this.rate = rate; - } - public String getLowerLimit() { - return lowerLimit; - } + public String getRate() { + return rate; + } - public void setLowerLimit(String lowerLimit) { - this.lowerLimit = lowerLimit; - } - public String getUpperLimit() { - return upperLimit; - } + public void setRate(String rate) { + this.rate = rate; + } - public void setUpperLimit(String upperLimit) { - this.upperLimit = upperLimit; - } - public BetaRewardsRateTierType getCriteriaType() { - return criteriaType; - } + public String getLowerLimit() { + return lowerLimit; + } - public void setCriteriaType(BetaRewardsRateTierType criteriaType) { - this.criteriaType = criteriaType; - } - public static class Builder { - private String rate; + public void setLowerLimit(String lowerLimit) { + this.lowerLimit = lowerLimit; + } - private String lowerLimit; + public String getUpperLimit() { + return upperLimit; + } - private String upperLimit; + public void setUpperLimit(String upperLimit) { + this.upperLimit = upperLimit; + } - private BetaRewardsRateTierType criteriaType; + public BetaRewardsRateTierType getCriteriaType() { + return criteriaType; + } - public Builder rate(String rate) { - this.rate = rate; - return this; - } + public void setCriteriaType(BetaRewardsRateTierType criteriaType) { + this.criteriaType = criteriaType; + } - public Builder lowerLimit(String lowerLimit) { - this.lowerLimit = lowerLimit; - return this; - } + public static class Builder { + private String rate; - public Builder upperLimit(String upperLimit) { - this.upperLimit = upperLimit; - return this; - } + private String lowerLimit; - public Builder criteriaType(BetaRewardsRateTierType criteriaType) { - this.criteriaType = criteriaType; - return this; - } + private String upperLimit; - public BetaRewardsRateTier build() { - return new BetaRewardsRateTier(this); - } + private BetaRewardsRateTierType criteriaType; + + public Builder rate(String rate) { + this.rate = rate; + return this; + } + + public Builder lowerLimit(String lowerLimit) { + this.lowerLimit = lowerLimit; + return this; + } + + public Builder upperLimit(String upperLimit) { + this.upperLimit = upperLimit; + return this; } -} + public Builder criteriaType(BetaRewardsRateTierType criteriaType) { + this.criteriaType = criteriaType; + return this; + } + + public BetaRewardsRateTier build() { + return new BetaRewardsRateTier(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java b/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java index aa458c05..02821169 100644 --- a/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java +++ b/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java @@ -17,100 +17,105 @@ */ 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. The Settlement Date represents the + * date contractually agreed upon by the transacting parties; actual settlement will occur upon + * completion of the transfer, which may differ from such agreed date. + */ + @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. The Settlement Date represents the date contractually agreed upon by the transacting parties; actual settlement will occur upon completion of the transfer, which may differ from such agreed date. - */ - @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 a07667e2..6e55858e 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 b0ffa812..10db8cad 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 09975bff..5594bd22 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/ComboLeg.java b/src/main/java/com/coinbase/prime/model/ComboLeg.java index 7018d8e9..7c323a66 100644 --- a/src/main/java/com/coinbase/prime/model/ComboLeg.java +++ b/src/main/java/com/coinbase/prime/model/ComboLeg.java @@ -17,80 +17,77 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.OrderSide; import com.fasterxml.jackson.annotation.JsonProperty; /** ComboLeg describes a single leg within an options combo order. */ public class ComboLeg { - /** - * The product identifier for the options instrument (e.g., \"BTC-28MAR25-50000-C\"). - */ - @JsonProperty("product_id") - private String productId; + /** The product identifier for the options instrument (e.g., \"BTC-28MAR25-50000-C\"). */ + @JsonProperty("product_id") + private String productId; - private String quantity; + private String quantity; - /** - * - UNKNOWN_ORDER_SIDE: nil value - * - BUY: Buy order - * - SELL: Sell order - */ - private OrderSide side; + /** - UNKNOWN_ORDER_SIDE: nil value - BUY: Buy order - SELL: Sell order */ + private OrderSide side; - public ComboLeg() { - } + public ComboLeg() {} - public ComboLeg(Builder builder) { - this.productId = builder.productId; - this.quantity = builder.quantity; - this.side = builder.side; - } - public String getProductId() { - return productId; - } + public ComboLeg(Builder builder) { + this.productId = builder.productId; + this.quantity = builder.quantity; + this.side = builder.side; + } - public void setProductId(String productId) { - this.productId = productId; - } - public String getQuantity() { - return quantity; - } + public String getProductId() { + return productId; + } - public void setQuantity(String quantity) { - this.quantity = quantity; - } - public OrderSide getSide() { - return side; - } + public void setProductId(String productId) { + this.productId = productId; + } - public void setSide(OrderSide side) { - this.side = side; - } - public static class Builder { - private String productId; + public String getQuantity() { + return quantity; + } - private String quantity; + public void setQuantity(String quantity) { + this.quantity = quantity; + } - private OrderSide side; + public OrderSide getSide() { + return side; + } - public Builder productId(String productId) { - this.productId = productId; - return this; - } + public void setSide(OrderSide side) { + this.side = side; + } - public Builder quantity(String quantity) { - this.quantity = quantity; - return this; - } + public static class Builder { + private String productId; + + private String quantity; - public Builder side(OrderSide side) { - this.side = side; - return this; - } + private OrderSide side; - public ComboLeg build() { - return new ComboLeg(this); - } + public Builder productId(String productId) { + this.productId = productId; + return this; } -} + public Builder quantity(String quantity) { + this.quantity = quantity; + return this; + } + + public Builder side(OrderSide side) { + this.side = side; + return this; + } + + public ComboLeg build() { + return new ComboLeg(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Commission.java b/src/main/java/com/coinbase/prime/model/Commission.java index f57238d6..2e6ec812 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 b9b6d2cb..dd68544c 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 6389647c..f26ae77e 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 44f49208..b55b319d 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/ConversionFee.java b/src/main/java/com/coinbase/prime/model/ConversionFee.java index 959d1cac..f6a05d13 100644 --- a/src/main/java/com/coinbase/prime/model/ConversionFee.java +++ b/src/main/java/com/coinbase/prime/model/ConversionFee.java @@ -17,108 +17,109 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.ConversionFeeTier; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** - * Per-pair conversion fee row: month-to-date net conversion volume and - * the applicable progressive fee tiers for an organization. + * Per-pair conversion fee row: month-to-date net conversion volume and the applicable progressive + * fee tiers for an organization. */ public class ConversionFee { - /** - * Source currency ticker. - */ - @JsonProperty("from_currency") + /** Source currency ticker. */ + @JsonProperty("from_currency") + private String fromCurrency; + + /** Destination currency ticker. */ + @JsonProperty("to_currency") + private String toCurrency; + + /** + * Month-to-date net conversion volume denominated in from_currency, aggregated at the owning + * organization level. Positive = net from->to, negative = net to->from. + */ + @JsonProperty("net_conversion_volume_mtd") + private String netConversionVolumeMtd; + + /** + * Progressive fee tiers applicable to this organization for this pair. Tiers are ordered from + * lowest to highest threshold. + */ + @JsonProperty("fee_tiers") + private List feeTiers; + + public ConversionFee() {} + + public ConversionFee(Builder builder) { + this.fromCurrency = builder.fromCurrency; + this.toCurrency = builder.toCurrency; + this.netConversionVolumeMtd = builder.netConversionVolumeMtd; + this.feeTiers = builder.feeTiers; + } + + public String getFromCurrency() { + return fromCurrency; + } + + public void setFromCurrency(String fromCurrency) { + this.fromCurrency = fromCurrency; + } + + public String getToCurrency() { + return toCurrency; + } + + public void setToCurrency(String toCurrency) { + this.toCurrency = toCurrency; + } + + public String getNetConversionVolumeMtd() { + return netConversionVolumeMtd; + } + + public void setNetConversionVolumeMtd(String netConversionVolumeMtd) { + this.netConversionVolumeMtd = netConversionVolumeMtd; + } + + public List getFeeTiers() { + return feeTiers; + } + + public void setFeeTiers(List feeTiers) { + this.feeTiers = feeTiers; + } + + public static class Builder { private String fromCurrency; - /** - * Destination currency ticker. - */ - @JsonProperty("to_currency") private String toCurrency; - /** - * Month-to-date net conversion volume denominated in from_currency, aggregated at the owning organization level. Positive = net from->to, negative = net to->from. - */ - @JsonProperty("net_conversion_volume_mtd") private String netConversionVolumeMtd; - /** - * Progressive fee tiers applicable to this organization for this pair. Tiers are ordered from lowest to highest threshold. - */ - @JsonProperty("fee_tiers") private List feeTiers; - public ConversionFee() { + public Builder fromCurrency(String fromCurrency) { + this.fromCurrency = fromCurrency; + return this; } - public ConversionFee(Builder builder) { - this.fromCurrency = builder.fromCurrency; - this.toCurrency = builder.toCurrency; - this.netConversionVolumeMtd = builder.netConversionVolumeMtd; - this.feeTiers = builder.feeTiers; - } - public String getFromCurrency() { - return fromCurrency; + public Builder toCurrency(String toCurrency) { + this.toCurrency = toCurrency; + return this; } - public void setFromCurrency(String fromCurrency) { - this.fromCurrency = fromCurrency; - } - public String getToCurrency() { - return toCurrency; + public Builder netConversionVolumeMtd(String netConversionVolumeMtd) { + this.netConversionVolumeMtd = netConversionVolumeMtd; + return this; } - public void setToCurrency(String toCurrency) { - this.toCurrency = toCurrency; - } - public String getNetConversionVolumeMtd() { - return netConversionVolumeMtd; + public Builder feeTiers(List feeTiers) { + this.feeTiers = feeTiers; + return this; } - public void setNetConversionVolumeMtd(String netConversionVolumeMtd) { - this.netConversionVolumeMtd = netConversionVolumeMtd; - } - public List getFeeTiers() { - return feeTiers; - } - - public void setFeeTiers(List feeTiers) { - this.feeTiers = feeTiers; - } - public static class Builder { - private String fromCurrency; - - private String toCurrency; - - private String netConversionVolumeMtd; - - private List feeTiers; - - public Builder fromCurrency(String fromCurrency) { - this.fromCurrency = fromCurrency; - return this; - } - - public Builder toCurrency(String toCurrency) { - this.toCurrency = toCurrency; - return this; - } - - public Builder netConversionVolumeMtd(String netConversionVolumeMtd) { - this.netConversionVolumeMtd = netConversionVolumeMtd; - return this; - } - - public Builder feeTiers(List feeTiers) { - this.feeTiers = feeTiers; - return this; - } - - public ConversionFee build() { - return new ConversionFee(this); - } + public ConversionFee build() { + return new ConversionFee(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/ConversionFeeTier.java b/src/main/java/com/coinbase/prime/model/ConversionFeeTier.java index f4c30613..9bd5d309 100644 --- a/src/main/java/com/coinbase/prime/model/ConversionFeeTier.java +++ b/src/main/java/com/coinbase/prime/model/ConversionFeeTier.java @@ -17,82 +17,79 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** A single fee tier in the progressive stablecoin conversion schedule. */ public class ConversionFeeTier { - /** - * Inclusive lower bound for the tier in USD. - */ - @JsonProperty("min_threshold") - private String minThreshold; + /** Inclusive lower bound for the tier in USD. */ + @JsonProperty("min_threshold") + private String minThreshold; - /** - * Exclusive upper bound for the tier in USD. Empty string for the highest, unbounded tier. - */ - @JsonProperty("max_threshold") - private String maxThreshold; + /** Exclusive upper bound for the tier in USD. Empty string for the highest, unbounded tier. */ + @JsonProperty("max_threshold") + private String maxThreshold; - /** - * Tier rate in basis points. - */ - @JsonProperty("rate_bps") - private String rateBps; + /** Tier rate in basis points. */ + @JsonProperty("rate_bps") + private String rateBps; - public ConversionFeeTier() { - } + public ConversionFeeTier() {} - public ConversionFeeTier(Builder builder) { - this.minThreshold = builder.minThreshold; - this.maxThreshold = builder.maxThreshold; - this.rateBps = builder.rateBps; - } - public String getMinThreshold() { - return minThreshold; - } + public ConversionFeeTier(Builder builder) { + this.minThreshold = builder.minThreshold; + this.maxThreshold = builder.maxThreshold; + this.rateBps = builder.rateBps; + } - public void setMinThreshold(String minThreshold) { - this.minThreshold = minThreshold; - } - public String getMaxThreshold() { - return maxThreshold; - } + public String getMinThreshold() { + return minThreshold; + } - public void setMaxThreshold(String maxThreshold) { - this.maxThreshold = maxThreshold; - } - public String getRateBps() { - return rateBps; - } + public void setMinThreshold(String minThreshold) { + this.minThreshold = minThreshold; + } - public void setRateBps(String rateBps) { - this.rateBps = rateBps; - } - public static class Builder { - private String minThreshold; + public String getMaxThreshold() { + return maxThreshold; + } - private String maxThreshold; + public void setMaxThreshold(String maxThreshold) { + this.maxThreshold = maxThreshold; + } - private String rateBps; + public String getRateBps() { + return rateBps; + } - public Builder minThreshold(String minThreshold) { - this.minThreshold = minThreshold; - return this; - } + public void setRateBps(String rateBps) { + this.rateBps = rateBps; + } - public Builder maxThreshold(String maxThreshold) { - this.maxThreshold = maxThreshold; - return this; - } + public static class Builder { + private String minThreshold; + + private String maxThreshold; - public Builder rateBps(String rateBps) { - this.rateBps = rateBps; - return this; - } + private String rateBps; - public ConversionFeeTier build() { - return new ConversionFeeTier(this); - } + public Builder minThreshold(String minThreshold) { + this.minThreshold = minThreshold; + return this; } -} + public Builder maxThreshold(String maxThreshold) { + this.maxThreshold = maxThreshold; + return this; + } + + public Builder rateBps(String rateBps) { + this.rateBps = rateBps; + return this; + } + + public ConversionFeeTier build() { + return new ConversionFeeTier(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Counterparty.java b/src/main/java/com/coinbase/prime/model/Counterparty.java index c64b2d65..5aa627d8 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 c32c5c89..1d98213f 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 b20934dd..41b9f63d 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 a513d8de..400fa72b 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 b7f3e92e..8727ef7f 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 8fbc2f75..bb84bcb0 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 feef16f6..4a7487fd 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 5fab1bf9..531628b4 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 d246142e..f29a85ef 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 9a8f9f07..69870079 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 2db20d53..6d73dde7 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/CustomStablecoinAsset.java b/src/main/java/com/coinbase/prime/model/CustomStablecoinAsset.java index 7e10e40d..4f67c4b5 100644 --- a/src/main/java/com/coinbase/prime/model/CustomStablecoinAsset.java +++ b/src/main/java/com/coinbase/prime/model/CustomStablecoinAsset.java @@ -20,35 +20,33 @@ /** Currency metadata of the custom stablecoin asset for the reward program */ public class CustomStablecoinAsset { - /** - * The asset symbol (e.g. USDC, USDF) - */ - private String symbol; + /** The asset symbol (e.g. USDC, USDF) */ + private String symbol; - public CustomStablecoinAsset() { - } + public CustomStablecoinAsset() {} - public CustomStablecoinAsset(Builder builder) { - this.symbol = builder.symbol; - } - public String getSymbol() { - return symbol; - } + public CustomStablecoinAsset(Builder builder) { + this.symbol = builder.symbol; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public static class Builder { - private String symbol; + public String getSymbol() { + return symbol; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public CustomStablecoinAsset build() { - return new CustomStablecoinAsset(this); - } + public static class Builder { + private String symbol; + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public CustomStablecoinAsset build() { + return new CustomStablecoinAsset(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java b/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java index 2f2bafa9..ea021949 100644 --- a/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java +++ b/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java @@ -17,80 +17,78 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.CustomStablecoinAsset; + 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; - /** Currency metadata of the custom stablecoin asset for the reward program */ - private CustomStablecoinAsset asset; + /** Currency metadata of the custom stablecoin asset for the reward program */ + private CustomStablecoinAsset asset; - public CustomStablecoinRewardDetails() { - } + public CustomStablecoinRewardDetails() {} - public CustomStablecoinRewardDetails(Builder builder) { - this.startDate = builder.startDate; - this.endDate = builder.endDate; - this.asset = builder.asset; - } - public String getStartDate() { - return startDate; - } + public CustomStablecoinRewardDetails(Builder builder) { + this.startDate = builder.startDate; + this.endDate = builder.endDate; + this.asset = builder.asset; + } - 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 CustomStablecoinAsset getAsset() { - return asset; - } + public void setStartDate(String startDate) { + this.startDate = startDate; + } - public void setAsset(CustomStablecoinAsset asset) { - this.asset = asset; - } - public static class Builder { - private String startDate; + public String getEndDate() { + return endDate; + } - private String endDate; + public void setEndDate(String endDate) { + this.endDate = endDate; + } - private CustomStablecoinAsset asset; + public CustomStablecoinAsset getAsset() { + return asset; + } - public Builder startDate(String startDate) { - this.startDate = startDate; - return this; - } + public void setAsset(CustomStablecoinAsset asset) { + this.asset = asset; + } - public Builder endDate(String endDate) { - this.endDate = endDate; - return this; - } + public static class Builder { + private String startDate; + + private String endDate; - public Builder asset(CustomStablecoinAsset asset) { - this.asset = asset; - return this; - } + private CustomStablecoinAsset asset; - 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 Builder asset(CustomStablecoinAsset asset) { + this.asset = asset; + 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 c3da2d5e..9b65542b 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 c4baeb71..bc53f3d2 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/DerivativePosition.java b/src/main/java/com/coinbase/prime/model/DerivativePosition.java index f650d2a4..7cec3a20 100644 --- a/src/main/java/com/coinbase/prime/model/DerivativePosition.java +++ b/src/main/java/com/coinbase/prime/model/DerivativePosition.java @@ -17,278 +17,268 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.DerivativeProductType; import com.coinbase.prime.model.enums.FcmPositionSide; -import com.coinbase.prime.model.OptionsDetails; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** A single derivative position across all derivative product types. */ public class DerivativePosition { - /** - * 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; + + /** + * The general type of a derivative product. - DERIVATIVE_PRODUCT_TYPE_UNSPECIFIED: Unknown + * product type. - DERIVATIVE_PRODUCT_TYPE_SPOT: Spot product. - DERIVATIVE_PRODUCT_TYPE_FUTURE: + * Future product. - DERIVATIVE_PRODUCT_TYPE_EQUITY: Equity product. - + * DERIVATIVE_PRODUCT_TYPE_PREDICTION_MARKET: Prediction market product. - + * DERIVATIVE_PRODUCT_TYPE_OPTION: Option product. - DERIVATIVE_PRODUCT_TYPE_BASIS: Basis product. + * - DERIVATIVE_PRODUCT_TYPE_EQUITY_OPTION: Equity option product. - + * DERIVATIVE_PRODUCT_TYPE_FUTURE_COMBO: Future combo product. - + * DERIVATIVE_PRODUCT_TYPE_OPTION_COMBO: Option combo product. + */ + @JsonProperty("product_type") + private DerivativeProductType productType; + + /** Settlement currency */ + private String currency; + + /** Options-specific details for a derivative position, including greeks. */ + @JsonProperty("options_details") + private OptionsDetails optionsDetails; + + /** Venue ID of the position */ + @JsonProperty("venue_id") + private String venueId; + + public DerivativePosition() {} + + public DerivativePosition(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; + this.productType = builder.productType; + this.currency = builder.currency; + this.optionsDetails = builder.optionsDetails; + this.venueId = builder.venueId; + } + + 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 DerivativeProductType getProductType() { + return productType; + } + + public void setProductType(DerivativeProductType productType) { + this.productType = productType; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public OptionsDetails getOptionsDetails() { + return optionsDetails; + } + + public void setOptionsDetails(OptionsDetails optionsDetails) { + this.optionsDetails = optionsDetails; + } + + public String getVenueId() { + return venueId; + } + + public void setVenueId(String venueId) { + this.venueId = venueId; + } + + 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; - /** - * The general type of a derivative product. - * - DERIVATIVE_PRODUCT_TYPE_UNSPECIFIED: Unknown product type. - * - DERIVATIVE_PRODUCT_TYPE_SPOT: Spot product. - * - DERIVATIVE_PRODUCT_TYPE_FUTURE: Future product. - * - DERIVATIVE_PRODUCT_TYPE_EQUITY: Equity product. - * - DERIVATIVE_PRODUCT_TYPE_PREDICTION_MARKET: Prediction market product. - * - DERIVATIVE_PRODUCT_TYPE_OPTION: Option product. - * - DERIVATIVE_PRODUCT_TYPE_BASIS: Basis product. - * - DERIVATIVE_PRODUCT_TYPE_EQUITY_OPTION: Equity option product. - * - DERIVATIVE_PRODUCT_TYPE_FUTURE_COMBO: Future combo product. - * - DERIVATIVE_PRODUCT_TYPE_OPTION_COMBO: Option combo product. - */ - @JsonProperty("product_type") private DerivativeProductType productType; - /** - * Settlement currency - */ private String currency; - /** Options-specific details for a derivative position, including greeks. */ - @JsonProperty("options_details") private OptionsDetails optionsDetails; - /** - * Venue ID of the position - */ - @JsonProperty("venue_id") private String venueId; - public DerivativePosition() { + public Builder productId(String productId) { + this.productId = productId; + return this; } - public DerivativePosition(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; - this.productType = builder.productType; - this.currency = builder.currency; - this.optionsDetails = builder.optionsDetails; - this.venueId = builder.venueId; - } - 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 String getAvgEntryPrice() { - return avgEntryPrice; + public Builder expirationTime(OffsetDateTime expirationTime) { + this.expirationTime = expirationTime; + return this; } - public void setAvgEntryPrice(String avgEntryPrice) { - this.avgEntryPrice = avgEntryPrice; - } - public OffsetDateTime getExpirationTime() { - return expirationTime; + public Builder productType(DerivativeProductType productType) { + this.productType = productType; + return this; } - public void setExpirationTime(OffsetDateTime expirationTime) { - this.expirationTime = expirationTime; - } - public DerivativeProductType getProductType() { - return productType; + public Builder currency(String currency) { + this.currency = currency; + return this; } - public void setProductType(DerivativeProductType productType) { - this.productType = productType; - } - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - public OptionsDetails getOptionsDetails() { - return optionsDetails; - } - - public void setOptionsDetails(OptionsDetails optionsDetails) { - this.optionsDetails = optionsDetails; - } - public String getVenueId() { - return venueId; + public Builder optionsDetails(OptionsDetails optionsDetails) { + this.optionsDetails = optionsDetails; + return this; } - public void setVenueId(String venueId) { - this.venueId = venueId; + public Builder venueId(String venueId) { + this.venueId = venueId; + return this; } - 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; - - private DerivativeProductType productType; - - private String currency; - - private OptionsDetails optionsDetails; - - private String venueId; - - 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 Builder productType(DerivativeProductType productType) { - this.productType = productType; - return this; - } - - public Builder currency(String currency) { - this.currency = currency; - return this; - } - - public Builder optionsDetails(OptionsDetails optionsDetails) { - this.optionsDetails = optionsDetails; - return this; - } - - public Builder venueId(String venueId) { - this.venueId = venueId; - return this; - } - - public DerivativePosition build() { - return new DerivativePosition(this); - } + public DerivativePosition build() { + return new DerivativePosition(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/DerivativesCurrencyBalance.java b/src/main/java/com/coinbase/prime/model/DerivativesCurrencyBalance.java index 83c36c96..6ea5aaa8 100644 --- a/src/main/java/com/coinbase/prime/model/DerivativesCurrencyBalance.java +++ b/src/main/java/com/coinbase/prime/model/DerivativesCurrencyBalance.java @@ -17,254 +17,244 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.FcmMarginHealthState; import com.fasterxml.jackson.annotation.JsonProperty; /** Balances for a single settlement currency within an international derivatives portfolio. */ public class DerivativesCurrencyBalance { - /** - * Settlement currency - */ + /** Settlement currency */ + private String currency; + + /** Cash balance for the currency */ + private String balance; + + /** Unrealized PNL */ + @JsonProperty("unrealized_pnl") + private String unrealizedPnl; + + /** Realized PNL */ + @JsonProperty("realized_pnl") + private String realizedPnl; + + /** Initial margin */ + @JsonProperty("initial_margin") + private String initialMargin; + + /** Maintenance margin */ + @JsonProperty("maintenance_margin") + private String maintenanceMargin; + + /** Margin balance for the currency */ + @JsonProperty("margin_balance") + private String marginBalance; + + /** Option value for the currency */ + @JsonProperty("option_value") + private String optionValue; + + /** Margin excess for the currency (negative indicates a margin deficit) */ + @JsonProperty("margin_excess") + private String marginExcess; + + /** Margin utilization for the currency, as a percentage */ + @JsonProperty("margin_utilization") + private String marginUtilization; + + /** + * 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. + */ + @JsonProperty("margin_health_state") + private FcmMarginHealthState marginHealthState; + + public DerivativesCurrencyBalance() {} + + public DerivativesCurrencyBalance(Builder builder) { + this.currency = builder.currency; + this.balance = builder.balance; + this.unrealizedPnl = builder.unrealizedPnl; + this.realizedPnl = builder.realizedPnl; + this.initialMargin = builder.initialMargin; + this.maintenanceMargin = builder.maintenanceMargin; + this.marginBalance = builder.marginBalance; + this.optionValue = builder.optionValue; + this.marginExcess = builder.marginExcess; + this.marginUtilization = builder.marginUtilization; + this.marginHealthState = builder.marginHealthState; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public String getBalance() { + return balance; + } + + public void setBalance(String balance) { + this.balance = balance; + } + + 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 getInitialMargin() { + return initialMargin; + } + + public void setInitialMargin(String initialMargin) { + this.initialMargin = initialMargin; + } + + public String getMaintenanceMargin() { + return maintenanceMargin; + } + + public void setMaintenanceMargin(String maintenanceMargin) { + this.maintenanceMargin = maintenanceMargin; + } + + public String getMarginBalance() { + return marginBalance; + } + + public void setMarginBalance(String marginBalance) { + this.marginBalance = marginBalance; + } + + public String getOptionValue() { + return optionValue; + } + + public void setOptionValue(String optionValue) { + this.optionValue = optionValue; + } + + public String getMarginExcess() { + return marginExcess; + } + + public void setMarginExcess(String marginExcess) { + this.marginExcess = marginExcess; + } + + public String getMarginUtilization() { + return marginUtilization; + } + + public void setMarginUtilization(String marginUtilization) { + this.marginUtilization = marginUtilization; + } + + public FcmMarginHealthState getMarginHealthState() { + return marginHealthState; + } + + public void setMarginHealthState(FcmMarginHealthState marginHealthState) { + this.marginHealthState = marginHealthState; + } + + public static class Builder { private String currency; - /** - * Cash balance for the currency - */ private String balance; - /** - * Unrealized PNL - */ - @JsonProperty("unrealized_pnl") private String unrealizedPnl; - /** - * Realized PNL - */ - @JsonProperty("realized_pnl") private String realizedPnl; - /** - * Initial margin - */ - @JsonProperty("initial_margin") private String initialMargin; - /** - * Maintenance margin - */ - @JsonProperty("maintenance_margin") private String maintenanceMargin; - /** - * Margin balance for the currency - */ - @JsonProperty("margin_balance") private String marginBalance; - /** - * Option value for the currency - */ - @JsonProperty("option_value") private String optionValue; - /** - * Margin excess for the currency (negative indicates a margin deficit) - */ - @JsonProperty("margin_excess") private String marginExcess; - /** - * Margin utilization for the currency, as a percentage - */ - @JsonProperty("margin_utilization") private String marginUtilization; - /** - * 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. - */ - @JsonProperty("margin_health_state") private FcmMarginHealthState marginHealthState; - public DerivativesCurrencyBalance() { + public Builder currency(String currency) { + this.currency = currency; + return this; } - public DerivativesCurrencyBalance(Builder builder) { - this.currency = builder.currency; - this.balance = builder.balance; - this.unrealizedPnl = builder.unrealizedPnl; - this.realizedPnl = builder.realizedPnl; - this.initialMargin = builder.initialMargin; - this.maintenanceMargin = builder.maintenanceMargin; - this.marginBalance = builder.marginBalance; - this.optionValue = builder.optionValue; - this.marginExcess = builder.marginExcess; - this.marginUtilization = builder.marginUtilization; - this.marginHealthState = builder.marginHealthState; - } - public String getCurrency() { - return currency; + public Builder balance(String balance) { + this.balance = balance; + return this; } - public void setCurrency(String currency) { - this.currency = currency; - } - public String getBalance() { - return balance; + public Builder unrealizedPnl(String unrealizedPnl) { + this.unrealizedPnl = unrealizedPnl; + return this; } - public void setBalance(String balance) { - this.balance = balance; - } - public String getUnrealizedPnl() { - return unrealizedPnl; + public Builder realizedPnl(String realizedPnl) { + this.realizedPnl = realizedPnl; + return this; } - public void setUnrealizedPnl(String unrealizedPnl) { - this.unrealizedPnl = unrealizedPnl; - } - public String getRealizedPnl() { - return realizedPnl; + public Builder initialMargin(String initialMargin) { + this.initialMargin = initialMargin; + return this; } - public void setRealizedPnl(String realizedPnl) { - this.realizedPnl = realizedPnl; - } - public String getInitialMargin() { - return initialMargin; + public Builder maintenanceMargin(String maintenanceMargin) { + this.maintenanceMargin = maintenanceMargin; + return this; } - public void setInitialMargin(String initialMargin) { - this.initialMargin = initialMargin; - } - public String getMaintenanceMargin() { - return maintenanceMargin; + public Builder marginBalance(String marginBalance) { + this.marginBalance = marginBalance; + return this; } - public void setMaintenanceMargin(String maintenanceMargin) { - this.maintenanceMargin = maintenanceMargin; - } - public String getMarginBalance() { - return marginBalance; + public Builder optionValue(String optionValue) { + this.optionValue = optionValue; + return this; } - public void setMarginBalance(String marginBalance) { - this.marginBalance = marginBalance; - } - public String getOptionValue() { - return optionValue; + public Builder marginExcess(String marginExcess) { + this.marginExcess = marginExcess; + return this; } - public void setOptionValue(String optionValue) { - this.optionValue = optionValue; - } - public String getMarginExcess() { - return marginExcess; + public Builder marginUtilization(String marginUtilization) { + this.marginUtilization = marginUtilization; + return this; } - public void setMarginExcess(String marginExcess) { - this.marginExcess = marginExcess; + public Builder marginHealthState(FcmMarginHealthState marginHealthState) { + this.marginHealthState = marginHealthState; + return this; } - public String getMarginUtilization() { - return marginUtilization; - } - - public void setMarginUtilization(String marginUtilization) { - this.marginUtilization = marginUtilization; - } - public FcmMarginHealthState getMarginHealthState() { - return marginHealthState; - } - - public void setMarginHealthState(FcmMarginHealthState marginHealthState) { - this.marginHealthState = marginHealthState; - } - public static class Builder { - private String currency; - - private String balance; - - private String unrealizedPnl; - - private String realizedPnl; - private String initialMargin; - - private String maintenanceMargin; - - private String marginBalance; - - private String optionValue; - - private String marginExcess; - - private String marginUtilization; - - private FcmMarginHealthState marginHealthState; - - public Builder currency(String currency) { - this.currency = currency; - return this; - } - - public Builder balance(String balance) { - this.balance = balance; - return this; - } - - public Builder unrealizedPnl(String unrealizedPnl) { - this.unrealizedPnl = unrealizedPnl; - return this; - } - - public Builder realizedPnl(String realizedPnl) { - this.realizedPnl = realizedPnl; - return this; - } - - public Builder initialMargin(String initialMargin) { - this.initialMargin = initialMargin; - return this; - } - - public Builder maintenanceMargin(String maintenanceMargin) { - this.maintenanceMargin = maintenanceMargin; - return this; - } - - public Builder marginBalance(String marginBalance) { - this.marginBalance = marginBalance; - return this; - } - - public Builder optionValue(String optionValue) { - this.optionValue = optionValue; - return this; - } - - public Builder marginExcess(String marginExcess) { - this.marginExcess = marginExcess; - return this; - } - - public Builder marginUtilization(String marginUtilization) { - this.marginUtilization = marginUtilization; - return this; - } - - public Builder marginHealthState(FcmMarginHealthState marginHealthState) { - this.marginHealthState = marginHealthState; - return this; - } - - public DerivativesCurrencyBalance build() { - return new DerivativesCurrencyBalance(this); - } + public DerivativesCurrencyBalance build() { + return new DerivativesCurrencyBalance(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/DestinationAlloc.java b/src/main/java/com/coinbase/prime/model/DestinationAlloc.java index 11eacdcc..59fc8035 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 6ef150b2..9627d47e 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 d2fb74f9..db14b2da 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 ceb692a0..ad0fd08f 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 c6422d8c..2e97ec79 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 fbef7eaa..cff61ee7 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 486270e9..de7c4013 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 758af2bf..c8a65d39 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 696588e8..a727e2ec 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 cfa33e98..f3ea0a3a 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 9edaba2f..c00b686a 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 a90e7e88..adf59b81 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 64c39e0b..72118ead 100644 --- a/src/main/java/com/coinbase/prime/model/Fill.java +++ b/src/main/java/com/coinbase/prime/model/Fill.java @@ -17,333 +17,317 @@ */ 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 - + * OPTION: Option 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 - * - OPTION: Option 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 4cee772d..fa7f62d8 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 96c3e0b8..28bc4b36 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 3f07869f..c5ddc694 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 c666a2c6..95598d6b 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 286f0a72..780c6dd9 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 47b85d65..d22753e6 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 2d91acd1..8a30363c 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 e6cba3c2..be312b26 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 4d320be6..d0c49cd6 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 ee529849..3c87f9fc 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 625c2f06..5eca7110 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 d4145735..7da17538 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 f59508ae..c8001498 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 2ace5093..640acf94 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 44491e1d..afe822c4 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 4ab0fbb8..90d3e6b5 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 7e72428c..aa3dd350 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 aafba594..6a46f4cf 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 5ca5a6c2..d57d361b 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 67bf05bc..6507fa6f 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 4bc0b2ed..8fa3b1be 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 d2bdfd67..bee92700 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 c764f5f3..3a37efb5 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 22c8ae1a..c3896a83 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 a49114ac..23df0787 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/OptionProductDetails.java b/src/main/java/com/coinbase/prime/model/OptionProductDetails.java index 33895a37..5d3e5dea 100644 --- a/src/main/java/com/coinbase/prime/model/OptionProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/OptionProductDetails.java @@ -17,8 +17,8 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.OptionType; -import com.coinbase.prime.model.PriceIncrementStep; import com.coinbase.prime.model.enums.SettlementModel; import com.coinbase.prime.model.enums.SettlementPeriod; import com.fasterxml.jackson.annotation.JsonProperty; @@ -27,296 +27,287 @@ /** OptionProductDetails contains details specific to option products */ public class OptionProductDetails { - /** - * The type of an option position. - * - OPTION_TYPE_UNSPECIFIED: Unspecified option type. - * - OPTION_TYPE_CALL: Call option. - * - OPTION_TYPE_PUT: Put option. - */ - @JsonProperty("option_type") + /** + * The type of an option position. - OPTION_TYPE_UNSPECIFIED: Unspecified option type. - + * OPTION_TYPE_CALL: Call option. - OPTION_TYPE_PUT: Put option. + */ + @JsonProperty("option_type") + private OptionType optionType; + + /** Strike price of the option */ + private String strike; + + /** Contract root unit (underlying asset) */ + @JsonProperty("contract_root_unit") + private String contractRootUnit; + + /** Currency the option settles in */ + @JsonProperty("settlement_currency") + private String settlementCurrency; + + /** Contract code identifier */ + @JsonProperty("contract_code") + private String contractCode; + + /** Descriptive name for the product group */ + @JsonProperty("group_description") + private String groupDescription; + + /** Contract size */ + @JsonProperty("contract_size") + private String contractSize; + + /** Contract expiry timestamp */ + @JsonProperty("contract_expiry") + private OffsetDateTime contractExpiry; + + /** + * - SETTLEMENT_PERIOD_UNSPECIFIED: Unspecified settlement period - SETTLEMENT_PERIOD_PERPETUAL: + * Contract never expires - SETTLEMENT_PERIOD_DAY: Contract expires daily - + * SETTLEMENT_PERIOD_WEEK: Contract expires weekly - SETTLEMENT_PERIOD_MONTH: Contract expires + * monthly + */ + @JsonProperty("settlement_period") + private SettlementPeriod settlementPeriod; + + /** + * - SETTLEMENT_MODEL_UNSPECIFIED: Unspecified settlement model - SETTLEMENT_MODEL_LINEAR: Settles + * in the quote currency - SETTLEMENT_MODEL_INVERSE: Settles in the base currency + */ + @JsonProperty("settlement_model") + private SettlementModel settlementModel; + + /** Currency the option is quoted against */ + @JsonProperty("counter_currency") + private String counterCurrency; + + /** Smallest tradable quantity of the contract */ + @JsonProperty("lot_size") + private String lotSize; + + /** + * Tiered price increments that override price_increment above a threshold; empty when a single + * price_increment applies + */ + @JsonProperty("price_increment_steps") + private List priceIncrementSteps; + + public OptionProductDetails() {} + + public OptionProductDetails(Builder builder) { + this.optionType = builder.optionType; + this.strike = builder.strike; + this.contractRootUnit = builder.contractRootUnit; + this.settlementCurrency = builder.settlementCurrency; + this.contractCode = builder.contractCode; + this.groupDescription = builder.groupDescription; + this.contractSize = builder.contractSize; + this.contractExpiry = builder.contractExpiry; + this.settlementPeriod = builder.settlementPeriod; + this.settlementModel = builder.settlementModel; + this.counterCurrency = builder.counterCurrency; + this.lotSize = builder.lotSize; + this.priceIncrementSteps = builder.priceIncrementSteps; + } + + public OptionType getOptionType() { + return optionType; + } + + public void setOptionType(OptionType optionType) { + this.optionType = optionType; + } + + public String getStrike() { + return strike; + } + + public void setStrike(String strike) { + this.strike = strike; + } + + public String getContractRootUnit() { + return contractRootUnit; + } + + public void setContractRootUnit(String contractRootUnit) { + this.contractRootUnit = contractRootUnit; + } + + public String getSettlementCurrency() { + return settlementCurrency; + } + + public void setSettlementCurrency(String settlementCurrency) { + this.settlementCurrency = settlementCurrency; + } + + public String getContractCode() { + return contractCode; + } + + public void setContractCode(String contractCode) { + this.contractCode = contractCode; + } + + public String getGroupDescription() { + return groupDescription; + } + + public void setGroupDescription(String groupDescription) { + this.groupDescription = groupDescription; + } + + 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 SettlementPeriod getSettlementPeriod() { + return settlementPeriod; + } + + public void setSettlementPeriod(SettlementPeriod settlementPeriod) { + this.settlementPeriod = settlementPeriod; + } + + public SettlementModel getSettlementModel() { + return settlementModel; + } + + public void setSettlementModel(SettlementModel settlementModel) { + this.settlementModel = settlementModel; + } + + public String getCounterCurrency() { + return counterCurrency; + } + + public void setCounterCurrency(String counterCurrency) { + this.counterCurrency = counterCurrency; + } + + public String getLotSize() { + return lotSize; + } + + public void setLotSize(String lotSize) { + this.lotSize = lotSize; + } + + public List getPriceIncrementSteps() { + return priceIncrementSteps; + } + + public void setPriceIncrementSteps(List priceIncrementSteps) { + this.priceIncrementSteps = priceIncrementSteps; + } + + public static class Builder { private OptionType optionType; - /** - * Strike price of the option - */ private String strike; - /** - * Contract root unit (underlying asset) - */ - @JsonProperty("contract_root_unit") private String contractRootUnit; - /** - * Currency the option settles in - */ - @JsonProperty("settlement_currency") private String settlementCurrency; - /** - * Contract code identifier - */ - @JsonProperty("contract_code") private String contractCode; - /** - * Descriptive name for the product group - */ - @JsonProperty("group_description") private String groupDescription; - /** - * Contract size - */ - @JsonProperty("contract_size") private String contractSize; - /** - * Contract expiry timestamp - */ - @JsonProperty("contract_expiry") private OffsetDateTime contractExpiry; - /** - * - SETTLEMENT_PERIOD_UNSPECIFIED: Unspecified settlement period - * - SETTLEMENT_PERIOD_PERPETUAL: Contract never expires - * - SETTLEMENT_PERIOD_DAY: Contract expires daily - * - SETTLEMENT_PERIOD_WEEK: Contract expires weekly - * - SETTLEMENT_PERIOD_MONTH: Contract expires monthly - */ - @JsonProperty("settlement_period") private SettlementPeriod settlementPeriod; - /** - * - SETTLEMENT_MODEL_UNSPECIFIED: Unspecified settlement model - * - SETTLEMENT_MODEL_LINEAR: Settles in the quote currency - * - SETTLEMENT_MODEL_INVERSE: Settles in the base currency - */ - @JsonProperty("settlement_model") private SettlementModel settlementModel; - /** - * Currency the option is quoted against - */ - @JsonProperty("counter_currency") private String counterCurrency; - /** - * Smallest tradable quantity of the contract - */ - @JsonProperty("lot_size") private String lotSize; - /** - * Tiered price increments that override price_increment above a threshold; empty when a single price_increment applies - */ - @JsonProperty("price_increment_steps") private List priceIncrementSteps; - public OptionProductDetails() { - } - - public OptionProductDetails(Builder builder) { - this.optionType = builder.optionType; - this.strike = builder.strike; - this.contractRootUnit = builder.contractRootUnit; - this.settlementCurrency = builder.settlementCurrency; - this.contractCode = builder.contractCode; - this.groupDescription = builder.groupDescription; - this.contractSize = builder.contractSize; - this.contractExpiry = builder.contractExpiry; - this.settlementPeriod = builder.settlementPeriod; - this.settlementModel = builder.settlementModel; - this.counterCurrency = builder.counterCurrency; - this.lotSize = builder.lotSize; - this.priceIncrementSteps = builder.priceIncrementSteps; - } - public OptionType getOptionType() { - return optionType; + public Builder optionType(OptionType optionType) { + this.optionType = optionType; + return this; } - public void setOptionType(OptionType optionType) { - this.optionType = optionType; - } - public String getStrike() { - return strike; + public Builder strike(String strike) { + this.strike = strike; + return this; } - public void setStrike(String strike) { - this.strike = strike; - } - public String getContractRootUnit() { - return contractRootUnit; + public Builder contractRootUnit(String contractRootUnit) { + this.contractRootUnit = contractRootUnit; + return this; } - public void setContractRootUnit(String contractRootUnit) { - this.contractRootUnit = contractRootUnit; - } - public String getSettlementCurrency() { - return settlementCurrency; + public Builder settlementCurrency(String settlementCurrency) { + this.settlementCurrency = settlementCurrency; + return this; } - public void setSettlementCurrency(String settlementCurrency) { - this.settlementCurrency = settlementCurrency; - } - public String getContractCode() { - return contractCode; + public Builder contractCode(String contractCode) { + this.contractCode = contractCode; + return this; } - public void setContractCode(String contractCode) { - this.contractCode = contractCode; - } - public String getGroupDescription() { - return groupDescription; + public Builder groupDescription(String groupDescription) { + this.groupDescription = groupDescription; + return this; } - public void setGroupDescription(String groupDescription) { - this.groupDescription = groupDescription; - } - public String getContractSize() { - return contractSize; + public Builder contractSize(String contractSize) { + this.contractSize = contractSize; + return this; } - public void setContractSize(String contractSize) { - this.contractSize = contractSize; - } - public OffsetDateTime getContractExpiry() { - return contractExpiry; + public Builder contractExpiry(OffsetDateTime contractExpiry) { + this.contractExpiry = contractExpiry; + return this; } - public void setContractExpiry(OffsetDateTime contractExpiry) { - this.contractExpiry = contractExpiry; - } - public SettlementPeriod getSettlementPeriod() { - return settlementPeriod; + public Builder settlementPeriod(SettlementPeriod settlementPeriod) { + this.settlementPeriod = settlementPeriod; + return this; } - public void setSettlementPeriod(SettlementPeriod settlementPeriod) { - this.settlementPeriod = settlementPeriod; - } - public SettlementModel getSettlementModel() { - return settlementModel; + public Builder settlementModel(SettlementModel settlementModel) { + this.settlementModel = settlementModel; + return this; } - public void setSettlementModel(SettlementModel settlementModel) { - this.settlementModel = settlementModel; - } - public String getCounterCurrency() { - return counterCurrency; + public Builder counterCurrency(String counterCurrency) { + this.counterCurrency = counterCurrency; + return this; } - public void setCounterCurrency(String counterCurrency) { - this.counterCurrency = counterCurrency; - } - public String getLotSize() { - return lotSize; + public Builder lotSize(String lotSize) { + this.lotSize = lotSize; + return this; } - public void setLotSize(String lotSize) { - this.lotSize = lotSize; - } - public List getPriceIncrementSteps() { - return priceIncrementSteps; + public Builder priceIncrementSteps(List priceIncrementSteps) { + this.priceIncrementSteps = priceIncrementSteps; + return this; } - public void setPriceIncrementSteps(List priceIncrementSteps) { - this.priceIncrementSteps = priceIncrementSteps; - } - public static class Builder { - private OptionType optionType; - - private String strike; - - private String contractRootUnit; - - private String settlementCurrency; - - private String contractCode; - - private String groupDescription; - - private String contractSize; - - private OffsetDateTime contractExpiry; - - private SettlementPeriod settlementPeriod; - - private SettlementModel settlementModel; - - private String counterCurrency; - - private String lotSize; - - private List priceIncrementSteps; - - public Builder optionType(OptionType optionType) { - this.optionType = optionType; - return this; - } - - public Builder strike(String strike) { - this.strike = strike; - return this; - } - - public Builder contractRootUnit(String contractRootUnit) { - this.contractRootUnit = contractRootUnit; - return this; - } - - public Builder settlementCurrency(String settlementCurrency) { - this.settlementCurrency = settlementCurrency; - return this; - } - - public Builder contractCode(String contractCode) { - this.contractCode = contractCode; - return this; - } - - public Builder groupDescription(String groupDescription) { - this.groupDescription = groupDescription; - return this; - } - - public Builder contractSize(String contractSize) { - this.contractSize = contractSize; - return this; - } - - public Builder contractExpiry(OffsetDateTime contractExpiry) { - this.contractExpiry = contractExpiry; - return this; - } - - public Builder settlementPeriod(SettlementPeriod settlementPeriod) { - this.settlementPeriod = settlementPeriod; - return this; - } - - public Builder settlementModel(SettlementModel settlementModel) { - this.settlementModel = settlementModel; - return this; - } - - public Builder counterCurrency(String counterCurrency) { - this.counterCurrency = counterCurrency; - return this; - } - - public Builder lotSize(String lotSize) { - this.lotSize = lotSize; - return this; - } - - public Builder priceIncrementSteps(List priceIncrementSteps) { - this.priceIncrementSteps = priceIncrementSteps; - return this; - } - - public OptionProductDetails build() { - return new OptionProductDetails(this); - } + public OptionProductDetails build() { + return new OptionProductDetails(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/OptionsDetails.java b/src/main/java/com/coinbase/prime/model/OptionsDetails.java index f7fac884..3a49cfa1 100644 --- a/src/main/java/com/coinbase/prime/model/OptionsDetails.java +++ b/src/main/java/com/coinbase/prime/model/OptionsDetails.java @@ -17,144 +17,138 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.OptionType; import com.fasterxml.jackson.annotation.JsonProperty; /** Options-specific details for a derivative position, including greeks. */ public class OptionsDetails { - /** - * Delta greek - */ - private String delta; + /** Delta greek */ + private String delta; - /** - * Gamma greek - */ - private String gamma; + /** Gamma greek */ + private String gamma; - /** - * Theta greek - */ - private String theta; + /** Theta greek */ + private String theta; - /** - * Vega greek - */ - private String vega; + /** Vega greek */ + private String vega; - /** - * Strike price - */ - private String strike; + /** Strike price */ + private String strike; - /** - * The type of an option position. - * - OPTION_TYPE_UNSPECIFIED: Unspecified option type. - * - OPTION_TYPE_CALL: Call option. - * - OPTION_TYPE_PUT: Put option. - */ - @JsonProperty("option_type") - private OptionType optionType; + /** + * The type of an option position. - OPTION_TYPE_UNSPECIFIED: Unspecified option type. - + * OPTION_TYPE_CALL: Call option. - OPTION_TYPE_PUT: Put option. + */ + @JsonProperty("option_type") + private OptionType optionType; - public OptionsDetails() { - } + public OptionsDetails() {} - public OptionsDetails(Builder builder) { - this.delta = builder.delta; - this.gamma = builder.gamma; - this.theta = builder.theta; - this.vega = builder.vega; - this.strike = builder.strike; - this.optionType = builder.optionType; - } - public String getDelta() { - return delta; - } + public OptionsDetails(Builder builder) { + this.delta = builder.delta; + this.gamma = builder.gamma; + this.theta = builder.theta; + this.vega = builder.vega; + this.strike = builder.strike; + this.optionType = builder.optionType; + } - public void setDelta(String delta) { - this.delta = delta; - } - public String getGamma() { - return gamma; - } + public String getDelta() { + return delta; + } - public void setGamma(String gamma) { - this.gamma = gamma; - } - public String getTheta() { - return theta; - } + public void setDelta(String delta) { + this.delta = delta; + } - public void setTheta(String theta) { - this.theta = theta; - } - public String getVega() { - return vega; - } + public String getGamma() { + return gamma; + } - public void setVega(String vega) { - this.vega = vega; - } - public String getStrike() { - return strike; - } + public void setGamma(String gamma) { + this.gamma = gamma; + } - public void setStrike(String strike) { - this.strike = strike; - } - public OptionType getOptionType() { - return optionType; - } + public String getTheta() { + return theta; + } - public void setOptionType(OptionType optionType) { - this.optionType = optionType; - } - public static class Builder { - private String delta; + public void setTheta(String theta) { + this.theta = theta; + } - private String gamma; + public String getVega() { + return vega; + } - private String theta; + public void setVega(String vega) { + this.vega = vega; + } - private String vega; + public String getStrike() { + return strike; + } - private String strike; + public void setStrike(String strike) { + this.strike = strike; + } - private OptionType optionType; + public OptionType getOptionType() { + return optionType; + } - public Builder delta(String delta) { - this.delta = delta; - return this; - } + public void setOptionType(OptionType optionType) { + this.optionType = optionType; + } - public Builder gamma(String gamma) { - this.gamma = gamma; - return this; - } + public static class Builder { + private String delta; + + private String gamma; + + private String theta; - public Builder theta(String theta) { - this.theta = theta; - return this; - } + private String vega; - public Builder vega(String vega) { - this.vega = vega; - return this; - } + private String strike; - public Builder strike(String strike) { - this.strike = strike; - return this; - } + private OptionType optionType; - public Builder optionType(OptionType optionType) { - this.optionType = optionType; - return this; - } + public Builder delta(String delta) { + this.delta = delta; + return this; + } - public OptionsDetails build() { - return new OptionsDetails(this); - } + public Builder gamma(String gamma) { + this.gamma = gamma; + return this; } -} + public Builder theta(String theta) { + this.theta = theta; + return this; + } + + public Builder vega(String vega) { + this.vega = vega; + return this; + } + + public Builder strike(String strike) { + this.strike = strike; + return this; + } + + public Builder optionType(OptionType optionType) { + this.optionType = optionType; + return this; + } + + public OptionsDetails build() { + return new OptionsDetails(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Order.java b/src/main/java/com/coinbase/prime/model/Order.java index b9ad96cc..f0907902 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,827 +28,816 @@ 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 - + * OPTION: Option product + */ + @JsonProperty("product_type") + private ProductType productType; + + @JsonProperty("commission_detail_total") + private CommissionDetailTotal commissionDetailTotal; + + /** + * Indicates if this was a buy exact order (fees charged on top of quote size for BUY orders sized + * in quote) + */ + @JsonProperty("is_buy_exact") + private boolean isBuyExact; + + 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; + this.isBuyExact = builder.isBuyExact; + } + + 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 boolean getIsBuyExact() { + return isBuyExact; + } + + public void setIsBuyExact(boolean isBuyExact) { + this.isBuyExact = isBuyExact; + } + + 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 - * - OPTION: Option product - */ - @JsonProperty("product_type") private ProductType productType; - @JsonProperty("commission_detail_total") private CommissionDetailTotal commissionDetailTotal; - /** - * Indicates if this was a buy exact order (fees charged on top of quote size for BUY orders sized in quote) - */ - @JsonProperty("is_buy_exact") private boolean isBuyExact; - public Order() { + public Builder id(String id) { + this.id = id; + return this; } - 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; - this.isBuyExact = builder.isBuyExact; - } - 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 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 boolean getIsBuyExact() { - return isBuyExact; + public Builder commissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; + return this; } - public void setIsBuyExact(boolean isBuyExact) { - this.isBuyExact = isBuyExact; + public Builder isBuyExact(boolean isBuyExact) { + this.isBuyExact = isBuyExact; + 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; - - private boolean isBuyExact; - - 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 Builder isBuyExact(boolean isBuyExact) { - this.isBuyExact = isBuyExact; - 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 99c5a6fd..d5a6af5b 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 c174f0e1..d5c70009 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 0ffad5e7..7c12fac8 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 77626dc2..1e76f859 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 eb281521..a196bd62 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 96e9c1c5..7c9bad68 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 aced61a3..c5a9c8f0 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 1798796a..44c43eb0 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 2cc951b9..8ad0a2ea 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 31594cdc..573a8152 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 dd15ee1b..c3baac46 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 dc61b956..29ae30f2 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/PriceIncrementStep.java b/src/main/java/com/coinbase/prime/model/PriceIncrementStep.java index 5eb4e2a3..63a52e13 100644 --- a/src/main/java/com/coinbase/prime/model/PriceIncrementStep.java +++ b/src/main/java/com/coinbase/prime/model/PriceIncrementStep.java @@ -17,65 +17,66 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** - * PriceIncrementStep overrides the product's price_increment for prices above a - * threshold. A price takes the increment of the highest step whose threshold it - * strictly exceeds, and the product's price_increment when it exceeds none. + * PriceIncrementStep overrides the product's price_increment for prices above a threshold. A price + * takes the increment of the highest step whose threshold it strictly exceeds, and the product's + * price_increment when it exceeds none. */ public class PriceIncrementStep { - /** - * Prices strictly greater than this threshold use this step's price increment; a price equal to it takes the next lower step - */ - @JsonProperty("price_threshold") - private String priceThreshold; + /** + * Prices strictly greater than this threshold use this step's price increment; a price equal to + * it takes the next lower step + */ + @JsonProperty("price_threshold") + private String priceThreshold; - /** - * Minimum price increment applied to prices above the threshold - */ - @JsonProperty("price_increment") - private String priceIncrement; + /** Minimum price increment applied to prices above the threshold */ + @JsonProperty("price_increment") + private String priceIncrement; - public PriceIncrementStep() { - } + public PriceIncrementStep() {} - public PriceIncrementStep(Builder builder) { - this.priceThreshold = builder.priceThreshold; - this.priceIncrement = builder.priceIncrement; - } - public String getPriceThreshold() { - return priceThreshold; - } + public PriceIncrementStep(Builder builder) { + this.priceThreshold = builder.priceThreshold; + this.priceIncrement = builder.priceIncrement; + } - public void setPriceThreshold(String priceThreshold) { - this.priceThreshold = priceThreshold; - } - public String getPriceIncrement() { - return priceIncrement; - } + public String getPriceThreshold() { + return priceThreshold; + } - public void setPriceIncrement(String priceIncrement) { - this.priceIncrement = priceIncrement; - } - public static class Builder { - private String priceThreshold; + public void setPriceThreshold(String priceThreshold) { + this.priceThreshold = priceThreshold; + } - private String priceIncrement; + public String getPriceIncrement() { + return priceIncrement; + } - public Builder priceThreshold(String priceThreshold) { - this.priceThreshold = priceThreshold; - return this; - } + public void setPriceIncrement(String priceIncrement) { + this.priceIncrement = priceIncrement; + } - public Builder priceIncrement(String priceIncrement) { - this.priceIncrement = priceIncrement; - return this; - } + public static class Builder { + private String priceThreshold; + + private String priceIncrement; - public PriceIncrementStep build() { - return new PriceIncrementStep(this); - } + public Builder priceThreshold(String priceThreshold) { + this.priceThreshold = priceThreshold; + return this; } -} + public Builder priceIncrement(String priceIncrement) { + this.priceIncrement = priceIncrement; + return this; + } + + public PriceIncrementStep build() { + return new PriceIncrementStep(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java b/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java index f0014b3f..d13b04c0 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 518b8a80..9a0202c5 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 f4315fcf..afc3a5c2 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 0d483d24..55a2f2bd 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 81cd835e..2021ef7c 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 ac4650ec..58e0ca85 100644 --- a/src/main/java/com/coinbase/prime/model/Product.java +++ b/src/main/java/com/coinbase/prime/model/Product.java @@ -17,311 +17,301 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.FcmTradingSessionDetails; -import com.coinbase.prime.model.FutureProductDetails; -import com.coinbase.prime.model.OptionProductDetails; + 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 - + * OPTION: Option 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; + + /** OptionProductDetails contains details specific to option products */ + @JsonProperty("option_product_details") + private OptionProductDetails optionProductDetails; + + 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; + this.optionProductDetails = builder.optionProductDetails; + } + + 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 OptionProductDetails getOptionProductDetails() { + return optionProductDetails; + } + + public void setOptionProductDetails(OptionProductDetails optionProductDetails) { + this.optionProductDetails = optionProductDetails; + } + + 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 - * - OPTION: Option 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; - /** OptionProductDetails contains details specific to option products */ - @JsonProperty("option_product_details") private OptionProductDetails optionProductDetails; - public Product() { + public Builder id(String id) { + this.id = id; + return this; } - 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; - this.optionProductDetails = builder.optionProductDetails; - } - 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 Builder baseIncrement(String baseIncrement) { + this.baseIncrement = baseIncrement; + return this; } - public void setQuoteIncrement(String quoteIncrement) { - this.quoteIncrement = quoteIncrement; - } - public String getBaseMinSize() { - return baseMinSize; + public Builder quoteIncrement(String quoteIncrement) { + this.quoteIncrement = quoteIncrement; + return this; } - public void setBaseMinSize(String baseMinSize) { - this.baseMinSize = baseMinSize; - } - public String getQuoteMinSize() { - return quoteMinSize; + public Builder baseMinSize(String baseMinSize) { + this.baseMinSize = baseMinSize; + return this; } - public void setQuoteMinSize(String quoteMinSize) { - this.quoteMinSize = quoteMinSize; - } - public String getBaseMaxSize() { - return baseMaxSize; + public Builder quoteMinSize(String quoteMinSize) { + this.quoteMinSize = quoteMinSize; + return this; } - public void setBaseMaxSize(String baseMaxSize) { - this.baseMaxSize = baseMaxSize; - } - public String getQuoteMaxSize() { - return quoteMaxSize; + public Builder baseMaxSize(String baseMaxSize) { + this.baseMaxSize = baseMaxSize; + return this; } - public void setQuoteMaxSize(String quoteMaxSize) { - this.quoteMaxSize = quoteMaxSize; - } - public List getPermissions() { - return permissions; + public Builder quoteMaxSize(String quoteMaxSize) { + this.quoteMaxSize = quoteMaxSize; + return this; } - public void setPermissions(List permissions) { - this.permissions = permissions; - } - public String getPriceIncrement() { - return priceIncrement; + public Builder permissions(List permissions) { + this.permissions = permissions; + return this; } - public void setPriceIncrement(String priceIncrement) { - this.priceIncrement = priceIncrement; - } - public RfqProductDetails getRfqProductDetails() { - return rfqProductDetails; + public Builder priceIncrement(String priceIncrement) { + this.priceIncrement = priceIncrement; + return this; } - public void setRfqProductDetails(RfqProductDetails rfqProductDetails) { - this.rfqProductDetails = rfqProductDetails; - } - public ProductType getProductType() { - return productType; + public Builder rfqProductDetails(RfqProductDetails rfqProductDetails) { + this.rfqProductDetails = rfqProductDetails; + return this; } - public void setProductType(ProductType productType) { - this.productType = productType; - } - public FcmTradingSessionDetails getFcmTradingSessionDetails() { - return fcmTradingSessionDetails; + public Builder productType(ProductType productType) { + this.productType = productType; + return this; } - public void setFcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { - this.fcmTradingSessionDetails = fcmTradingSessionDetails; - } - public FutureProductDetails getFutureProductDetails() { - return futureProductDetails; + public Builder fcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { + this.fcmTradingSessionDetails = fcmTradingSessionDetails; + return this; } - public void setFutureProductDetails(FutureProductDetails futureProductDetails) { - this.futureProductDetails = futureProductDetails; - } - public OptionProductDetails getOptionProductDetails() { - return optionProductDetails; + public Builder futureProductDetails(FutureProductDetails futureProductDetails) { + this.futureProductDetails = futureProductDetails; + return this; } - public void setOptionProductDetails(OptionProductDetails optionProductDetails) { - this.optionProductDetails = optionProductDetails; + public Builder optionProductDetails(OptionProductDetails optionProductDetails) { + this.optionProductDetails = optionProductDetails; + return this; } - 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; - - private OptionProductDetails optionProductDetails; - - 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 Builder optionProductDetails(OptionProductDetails optionProductDetails) { - this.optionProductDetails = optionProductDetails; - 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 6f8ec0a9..1663fcc6 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 95f2ee70..c5dc33a9 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 78ae8c3a..b164c2af 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 fc50261a..47796996 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 f320bc0c..a8292492 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 d8641f13..4ac65a6f 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 3ed54518..9b0fff83 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 1d9b87b0..9616df69 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 507aafe1..2cd8de5d 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 73fa8723..4ccb1c48 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 e18b0f46..eb33282a 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 7ea73876..f8ad16ac 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 26abf3c0..08651a2d 100644 --- a/src/main/java/com/coinbase/prime/model/Transaction.java +++ b/src/main/java/com/coinbase/prime/model/Transaction.java @@ -17,605 +17,568 @@ */ 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 - MERGE_STAKE: + * On-chain transaction consolidating funds from different addresses belonging to the same wallet. + */ + 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 - * - MERGE_STAKE: On-chain transaction consolidating funds from different addresses belonging to the same wallet. - */ 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 46d2ced4..d132085c 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 fa75726e..93d2354b 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 59d11ae9..5bcea1a2 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 5ace1a6c..6a7b8e77 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 bb0a9912..9492abfc 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java @@ -17,250 +17,251 @@ */ 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; + + /** Detailed address information */ + @JsonProperty("vasp_address") + private DetailedAddress vaspAddress; + + 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; + this.vaspAddress = builder.vaspAddress; + } + + 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 DetailedAddress getVaspAddress() { + return vaspAddress; + } + + public void setVaspAddress(DetailedAddress vaspAddress) { + this.vaspAddress = vaspAddress; + } + + 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; - /** Detailed address information */ - @JsonProperty("vasp_address") private DetailedAddress vaspAddress; - 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; - this.vaspAddress = builder.vaspAddress; - } - 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 Builder vaspName(String vaspName) { + this.vaspName = vaspName; + return this; } - 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 Builder vaspAddress(DetailedAddress vaspAddress) { + this.vaspAddress = vaspAddress; + return this; } - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - public DetailedAddress getVaspAddress() { - return vaspAddress; - } - - public void setVaspAddress(DetailedAddress vaspAddress) { - this.vaspAddress = vaspAddress; - } - 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; - - private DetailedAddress vaspAddress; - - 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 Builder vaspAddress(DetailedAddress vaspAddress) { - this.vaspAddress = vaspAddress; - 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 b948ca74..e73f531f 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 e86fbeda..1df1943e 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 f0d68e13..3c488fe0 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 7540329e..448437df 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 f610b1c2..982a0d15 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 074da634..7a2698c1 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 e0ec10f9..3cb886e7 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 8919998d..91898d12 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 71f7ec11..59916531 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 6ca843cc..5b8e011f 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 df11453f..4c1adb38 100644 --- a/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java @@ -17,84 +17,90 @@ */ 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 - */ + /** + * 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 delegation end date in ISO date format (e.g. 2026-07-15). Required for AVAX; minimum + * 14-day delegation period applies. + */ + @JsonProperty("end_date") + private String endDate; + + public WalletStakeInputs() {} + + public WalletStakeInputs(Builder builder) { + this.amount = builder.amount; + this.validatorAddress = builder.validatorAddress; + this.endDate = builder.endDate; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public String getValidatorAddress() { + return validatorAddress; + } + + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } + + public String getEndDate() { + return endDate; + } + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + public static class Builder { 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 delegation end date in ISO date format (e.g. 2026-07-15). Required for AVAX; minimum 14-day delegation period applies. - */ - @JsonProperty("end_date") private String endDate; - public WalletStakeInputs() { - } - - public WalletStakeInputs(Builder builder) { - this.amount = builder.amount; - this.validatorAddress = builder.validatorAddress; - this.endDate = builder.endDate; - } - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - public String getValidatorAddress() { - return validatorAddress; + public Builder amount(String amount) { + this.amount = amount; + return this; } - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } - public String getEndDate() { - return endDate; + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + 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 amount; - - private String validatorAddress; - - private String endDate; - - public Builder amount(String amount) { - this.amount = amount; - return this; - } - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } - - public Builder endDate(String endDate) { - this.endDate = endDate; - 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 da001ba3..f7037786 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 ec17686d..bec0fee4 100644 --- a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java @@ -17,86 +17,89 @@ */ 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 - */ + /** + * 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; + + /** Optional validator address to unstake from. Only supported for a subset of protocols. */ + @JsonProperty("validator_address") + private String validatorAddress; + + public WalletUnstakeInputs() {} + + public WalletUnstakeInputs(Builder builder) { + this.amount = builder.amount; + this.validatorAllocations = builder.validatorAllocations; + this.validatorAddress = builder.validatorAddress; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public List getValidatorAllocations() { + return validatorAllocations; + } + + public void setValidatorAllocations(List validatorAllocations) { + this.validatorAllocations = validatorAllocations; + } + + public String getValidatorAddress() { + return validatorAddress; + } + + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } + + public static class Builder { 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; - /** - * Optional validator address to unstake from. Only supported for a subset of protocols. - */ - @JsonProperty("validator_address") private String validatorAddress; - public WalletUnstakeInputs() { - } - - public WalletUnstakeInputs(Builder builder) { - this.amount = builder.amount; - this.validatorAllocations = builder.validatorAllocations; - this.validatorAddress = builder.validatorAddress; - } - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - public List getValidatorAllocations() { - return validatorAllocations; + public Builder amount(String amount) { + this.amount = amount; + return this; } - public void setValidatorAllocations(List validatorAllocations) { - this.validatorAllocations = validatorAllocations; - } - public String getValidatorAddress() { - return validatorAddress; + public Builder validatorAllocations(List validatorAllocations) { + this.validatorAllocations = validatorAllocations; + 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 List validatorAllocations; - - private String validatorAddress; - - public Builder amount(String amount) { - this.amount = amount; - return this; - } - public Builder validatorAllocations(List validatorAllocations) { - this.validatorAllocations = validatorAllocations; - return this; - } - - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - 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 cd1950e1..532669d2 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/XMLiquidatedAsset.java b/src/main/java/com/coinbase/prime/model/XMLiquidatedAsset.java index 2e99c137..558012f9 100644 --- a/src/main/java/com/coinbase/prime/model/XMLiquidatedAsset.java +++ b/src/main/java/com/coinbase/prime/model/XMLiquidatedAsset.java @@ -17,123 +17,118 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** XMLiquidatedAsset provides per-asset detail for a liquidation */ public class XMLiquidatedAsset { - /** - * Asset currency - */ - private String asset; + /** Asset currency */ + private String asset; - /** - * Amount (nominal) of the asset that has been liquidated - */ - @JsonProperty("liquidated_amount") - private String liquidatedAmount; + /** Amount (nominal) of the asset that has been liquidated */ + @JsonProperty("liquidated_amount") + private String liquidatedAmount; - /** - * USD notional value of the liquidated amount - */ - @JsonProperty("liquidated_notional") - private String liquidatedNotional; + /** USD notional value of the liquidated amount */ + @JsonProperty("liquidated_notional") + private String liquidatedNotional; - /** - * Amount (nominal) of the asset remaining to be liquidated - */ - @JsonProperty("remaining_amount") - private String remainingAmount; + /** Amount (nominal) of the asset remaining to be liquidated */ + @JsonProperty("remaining_amount") + private String remainingAmount; - /** - * USD notional value of the remaining amount - */ - @JsonProperty("remaining_notional") - private String remainingNotional; + /** USD notional value of the remaining amount */ + @JsonProperty("remaining_notional") + private String remainingNotional; - public XMLiquidatedAsset() { - } + public XMLiquidatedAsset() {} - public XMLiquidatedAsset(Builder builder) { - this.asset = builder.asset; - this.liquidatedAmount = builder.liquidatedAmount; - this.liquidatedNotional = builder.liquidatedNotional; - this.remainingAmount = builder.remainingAmount; - this.remainingNotional = builder.remainingNotional; - } - public String getAsset() { - return asset; - } + public XMLiquidatedAsset(Builder builder) { + this.asset = builder.asset; + this.liquidatedAmount = builder.liquidatedAmount; + this.liquidatedNotional = builder.liquidatedNotional; + this.remainingAmount = builder.remainingAmount; + this.remainingNotional = builder.remainingNotional; + } - public void setAsset(String asset) { - this.asset = asset; - } - public String getLiquidatedAmount() { - return liquidatedAmount; - } + public String getAsset() { + return asset; + } - public void setLiquidatedAmount(String liquidatedAmount) { - this.liquidatedAmount = liquidatedAmount; - } - public String getLiquidatedNotional() { - return liquidatedNotional; - } + public void setAsset(String asset) { + this.asset = asset; + } - public void setLiquidatedNotional(String liquidatedNotional) { - this.liquidatedNotional = liquidatedNotional; - } - public String getRemainingAmount() { - return remainingAmount; - } + public String getLiquidatedAmount() { + return liquidatedAmount; + } - public void setRemainingAmount(String remainingAmount) { - this.remainingAmount = remainingAmount; - } - public String getRemainingNotional() { - return remainingNotional; - } + public void setLiquidatedAmount(String liquidatedAmount) { + this.liquidatedAmount = liquidatedAmount; + } - public void setRemainingNotional(String remainingNotional) { - this.remainingNotional = remainingNotional; - } - public static class Builder { - private String asset; + public String getLiquidatedNotional() { + return liquidatedNotional; + } - private String liquidatedAmount; + public void setLiquidatedNotional(String liquidatedNotional) { + this.liquidatedNotional = liquidatedNotional; + } - private String liquidatedNotional; + public String getRemainingAmount() { + return remainingAmount; + } - private String remainingAmount; + public void setRemainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + } - private String remainingNotional; + public String getRemainingNotional() { + return remainingNotional; + } - public Builder asset(String asset) { - this.asset = asset; - return this; - } + public void setRemainingNotional(String remainingNotional) { + this.remainingNotional = remainingNotional; + } - public Builder liquidatedAmount(String liquidatedAmount) { - this.liquidatedAmount = liquidatedAmount; - return this; - } + public static class Builder { + private String asset; - public Builder liquidatedNotional(String liquidatedNotional) { - this.liquidatedNotional = liquidatedNotional; - return this; - } + private String liquidatedAmount; - public Builder remainingAmount(String remainingAmount) { - this.remainingAmount = remainingAmount; - return this; - } + private String liquidatedNotional; - public Builder remainingNotional(String remainingNotional) { - this.remainingNotional = remainingNotional; - return this; - } + private String remainingAmount; - public XMLiquidatedAsset build() { - return new XMLiquidatedAsset(this); - } + private String remainingNotional; + + public Builder asset(String asset) { + this.asset = asset; + return this; + } + + public Builder liquidatedAmount(String liquidatedAmount) { + this.liquidatedAmount = liquidatedAmount; + return this; } -} + public Builder liquidatedNotional(String liquidatedNotional) { + this.liquidatedNotional = liquidatedNotional; + return this; + } + + public Builder remainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + return this; + } + + public Builder remainingNotional(String remainingNotional) { + this.remainingNotional = remainingNotional; + return this; + } + + public XMLiquidatedAsset build() { + return new XMLiquidatedAsset(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/XMLiquidationDetail.java b/src/main/java/com/coinbase/prime/model/XMLiquidationDetail.java index b21c3615..6be1d158 100644 --- a/src/main/java/com/coinbase/prime/model/XMLiquidationDetail.java +++ b/src/main/java/com/coinbase/prime/model/XMLiquidationDetail.java @@ -17,235 +17,227 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.XMLiquidatedAsset; + import com.coinbase.prime.model.enums.XMLiquidationStatus; -import com.coinbase.prime.model.XMSummary; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; /** XMLiquidationDetail provides detailed information about a single XM liquidation */ public class XMLiquidationDetail { - /** - * 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; + + /** Timestamp when the pre-liquidation phase started */ + @JsonProperty("pre_liquidation_start_time") + private OffsetDateTime preLiquidationStartTime; + + /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ + @JsonProperty("margin_summary") + private XMSummary marginSummary; + + /** Timestamp when active liquidation started */ + @JsonProperty("liquidation_start_time") + private OffsetDateTime liquidationStartTime; + + /** USD notional amount that has been filled so far */ + @JsonProperty("filled_amount") + private String filledAmount; + + /** USD notional amount remaining to be liquidated */ + @JsonProperty("remaining_amount") + private String remainingAmount; + + /** Timestamp when the liquidation finished */ + @JsonProperty("liquidation_finish_time") + private OffsetDateTime liquidationFinishTime; + + /** Per-asset breakdown of liquidated amounts */ + @JsonProperty("asset_breakdown") + private List assetBreakdown; + + public XMLiquidationDetail() {} + + public XMLiquidationDetail(Builder builder) { + this.liquidationId = builder.liquidationId; + this.status = builder.status; + this.shortfallAmount = builder.shortfallAmount; + this.preLiquidationStartTime = builder.preLiquidationStartTime; + this.marginSummary = builder.marginSummary; + this.liquidationStartTime = builder.liquidationStartTime; + this.filledAmount = builder.filledAmount; + this.remainingAmount = builder.remainingAmount; + this.liquidationFinishTime = builder.liquidationFinishTime; + this.assetBreakdown = builder.assetBreakdown; + } + + 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 OffsetDateTime getPreLiquidationStartTime() { + return preLiquidationStartTime; + } + + public void setPreLiquidationStartTime(OffsetDateTime preLiquidationStartTime) { + this.preLiquidationStartTime = preLiquidationStartTime; + } + + public XMSummary getMarginSummary() { + return marginSummary; + } + + public void setMarginSummary(XMSummary marginSummary) { + this.marginSummary = marginSummary; + } + + public OffsetDateTime getLiquidationStartTime() { + return liquidationStartTime; + } + + public void setLiquidationStartTime(OffsetDateTime liquidationStartTime) { + this.liquidationStartTime = liquidationStartTime; + } + + public String getFilledAmount() { + return filledAmount; + } + + public void setFilledAmount(String filledAmount) { + this.filledAmount = filledAmount; + } + + public String getRemainingAmount() { + return remainingAmount; + } + + public void setRemainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + } + + public OffsetDateTime getLiquidationFinishTime() { + return liquidationFinishTime; + } + + public void setLiquidationFinishTime(OffsetDateTime liquidationFinishTime) { + this.liquidationFinishTime = liquidationFinishTime; + } + + public List getAssetBreakdown() { + return assetBreakdown; + } + + public void setAssetBreakdown(List assetBreakdown) { + this.assetBreakdown = assetBreakdown; + } + + 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; - /** - * Timestamp when the pre-liquidation phase started - */ - @JsonProperty("pre_liquidation_start_time") private OffsetDateTime preLiquidationStartTime; - /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ - @JsonProperty("margin_summary") private XMSummary marginSummary; - /** - * Timestamp when active liquidation started - */ - @JsonProperty("liquidation_start_time") private OffsetDateTime liquidationStartTime; - /** - * USD notional amount that has been filled so far - */ - @JsonProperty("filled_amount") private String filledAmount; - /** - * USD notional amount remaining to be liquidated - */ - @JsonProperty("remaining_amount") private String remainingAmount; - /** - * Timestamp when the liquidation finished - */ - @JsonProperty("liquidation_finish_time") private OffsetDateTime liquidationFinishTime; - /** - * Per-asset breakdown of liquidated amounts - */ - @JsonProperty("asset_breakdown") private List assetBreakdown; - public XMLiquidationDetail() { + public Builder liquidationId(String liquidationId) { + this.liquidationId = liquidationId; + return this; } - public XMLiquidationDetail(Builder builder) { - this.liquidationId = builder.liquidationId; - this.status = builder.status; - this.shortfallAmount = builder.shortfallAmount; - this.preLiquidationStartTime = builder.preLiquidationStartTime; - this.marginSummary = builder.marginSummary; - this.liquidationStartTime = builder.liquidationStartTime; - this.filledAmount = builder.filledAmount; - this.remainingAmount = builder.remainingAmount; - this.liquidationFinishTime = builder.liquidationFinishTime; - this.assetBreakdown = builder.assetBreakdown; - } - public String getLiquidationId() { - return liquidationId; + public Builder status(XMLiquidationStatus status) { + this.status = status; + return this; } - public void setLiquidationId(String liquidationId) { - this.liquidationId = liquidationId; - } - public XMLiquidationStatus getStatus() { - return status; + public Builder shortfallAmount(String shortfallAmount) { + this.shortfallAmount = shortfallAmount; + return this; } - public void setStatus(XMLiquidationStatus status) { - this.status = status; - } - public String getShortfallAmount() { - return shortfallAmount; + public Builder preLiquidationStartTime(OffsetDateTime preLiquidationStartTime) { + this.preLiquidationStartTime = preLiquidationStartTime; + return this; } - public void setShortfallAmount(String shortfallAmount) { - this.shortfallAmount = shortfallAmount; - } - public OffsetDateTime getPreLiquidationStartTime() { - return preLiquidationStartTime; + public Builder marginSummary(XMSummary marginSummary) { + this.marginSummary = marginSummary; + return this; } - public void setPreLiquidationStartTime(OffsetDateTime preLiquidationStartTime) { - this.preLiquidationStartTime = preLiquidationStartTime; - } - public XMSummary getMarginSummary() { - return marginSummary; - } - - public void setMarginSummary(XMSummary marginSummary) { - this.marginSummary = marginSummary; - } - public OffsetDateTime getLiquidationStartTime() { - return liquidationStartTime; + public Builder liquidationStartTime(OffsetDateTime liquidationStartTime) { + this.liquidationStartTime = liquidationStartTime; + return this; } - public void setLiquidationStartTime(OffsetDateTime liquidationStartTime) { - this.liquidationStartTime = liquidationStartTime; - } - public String getFilledAmount() { - return filledAmount; + public Builder filledAmount(String filledAmount) { + this.filledAmount = filledAmount; + return this; } - public void setFilledAmount(String filledAmount) { - this.filledAmount = filledAmount; - } - public String getRemainingAmount() { - return remainingAmount; + public Builder remainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + return this; } - public void setRemainingAmount(String remainingAmount) { - this.remainingAmount = remainingAmount; - } - public OffsetDateTime getLiquidationFinishTime() { - return liquidationFinishTime; + public Builder liquidationFinishTime(OffsetDateTime liquidationFinishTime) { + this.liquidationFinishTime = liquidationFinishTime; + return this; } - public void setLiquidationFinishTime(OffsetDateTime liquidationFinishTime) { - this.liquidationFinishTime = liquidationFinishTime; - } - public List getAssetBreakdown() { - return assetBreakdown; + public Builder assetBreakdown(List assetBreakdown) { + this.assetBreakdown = assetBreakdown; + return this; } - public void setAssetBreakdown(List assetBreakdown) { - this.assetBreakdown = assetBreakdown; - } - public static class Builder { - private String liquidationId; - - private XMLiquidationStatus status; - - private String shortfallAmount; - - private OffsetDateTime preLiquidationStartTime; - - private XMSummary marginSummary; - - private OffsetDateTime liquidationStartTime; - - private String filledAmount; - - private String remainingAmount; - - private OffsetDateTime liquidationFinishTime; - - private List assetBreakdown; - - 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 Builder preLiquidationStartTime(OffsetDateTime preLiquidationStartTime) { - this.preLiquidationStartTime = preLiquidationStartTime; - return this; - } - - public Builder marginSummary(XMSummary marginSummary) { - this.marginSummary = marginSummary; - return this; - } - - public Builder liquidationStartTime(OffsetDateTime liquidationStartTime) { - this.liquidationStartTime = liquidationStartTime; - return this; - } - - public Builder filledAmount(String filledAmount) { - this.filledAmount = filledAmount; - return this; - } - - public Builder remainingAmount(String remainingAmount) { - this.remainingAmount = remainingAmount; - return this; - } - - public Builder liquidationFinishTime(OffsetDateTime liquidationFinishTime) { - this.liquidationFinishTime = liquidationFinishTime; - return this; - } - - public Builder assetBreakdown(List assetBreakdown) { - this.assetBreakdown = assetBreakdown; - return this; - } - - public XMLiquidationDetail build() { - return new XMLiquidationDetail(this); - } + public XMLiquidationDetail build() { + return new XMLiquidationDetail(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/XMLiquidationSummary.java b/src/main/java/com/coinbase/prime/model/XMLiquidationSummary.java index 3bcd4b22..97ffa79b 100644 --- a/src/main/java/com/coinbase/prime/model/XMLiquidationSummary.java +++ b/src/main/java/com/coinbase/prime/model/XMLiquidationSummary.java @@ -17,171 +17,166 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.XMLiquidationStatus; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** XMLiquidationSummary provides a summary of a single XM liquidation */ public class XMLiquidationSummary { - /** - * 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; + + /** USD notional amount that has been filled so far */ + @JsonProperty("filled_amount") + private String filledAmount; + + /** USD notional amount remaining to be liquidated */ + @JsonProperty("remaining_amount") + private String remainingAmount; + + /** Timestamp when the liquidation was created */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** Timestamp when the liquidation was completed */ + @JsonProperty("completed_at") + private OffsetDateTime completedAt; + + public XMLiquidationSummary() {} + + public XMLiquidationSummary(Builder builder) { + this.liquidationId = builder.liquidationId; + this.status = builder.status; + this.shortfallAmount = builder.shortfallAmount; + this.filledAmount = builder.filledAmount; + this.remainingAmount = builder.remainingAmount; + this.createdAt = builder.createdAt; + this.completedAt = builder.completedAt; + } + + 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 String getFilledAmount() { + return filledAmount; + } + + public void setFilledAmount(String filledAmount) { + this.filledAmount = filledAmount; + } + + public String getRemainingAmount() { + return remainingAmount; + } + + public void setRemainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + } + + 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 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; - /** - * USD notional amount that has been filled so far - */ - @JsonProperty("filled_amount") private String filledAmount; - /** - * USD notional amount remaining to be liquidated - */ - @JsonProperty("remaining_amount") private String remainingAmount; - /** - * Timestamp when the liquidation was created - */ - @JsonProperty("created_at") private OffsetDateTime createdAt; - /** - * Timestamp when the liquidation was completed - */ - @JsonProperty("completed_at") private OffsetDateTime completedAt; - public XMLiquidationSummary() { + public Builder liquidationId(String liquidationId) { + this.liquidationId = liquidationId; + return this; } - public XMLiquidationSummary(Builder builder) { - this.liquidationId = builder.liquidationId; - this.status = builder.status; - this.shortfallAmount = builder.shortfallAmount; - this.filledAmount = builder.filledAmount; - this.remainingAmount = builder.remainingAmount; - this.createdAt = builder.createdAt; - this.completedAt = builder.completedAt; - } - public String getLiquidationId() { - return liquidationId; + public Builder status(XMLiquidationStatus status) { + this.status = status; + return this; } - public void setLiquidationId(String liquidationId) { - this.liquidationId = liquidationId; - } - public XMLiquidationStatus getStatus() { - return status; + public Builder shortfallAmount(String shortfallAmount) { + this.shortfallAmount = shortfallAmount; + return this; } - public void setStatus(XMLiquidationStatus status) { - this.status = status; - } - public String getShortfallAmount() { - return shortfallAmount; + public Builder filledAmount(String filledAmount) { + this.filledAmount = filledAmount; + return this; } - public void setShortfallAmount(String shortfallAmount) { - this.shortfallAmount = shortfallAmount; - } - public String getFilledAmount() { - return filledAmount; + public Builder remainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + return this; } - public void setFilledAmount(String filledAmount) { - this.filledAmount = filledAmount; - } - public String getRemainingAmount() { - return remainingAmount; + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; } - public void setRemainingAmount(String remainingAmount) { - this.remainingAmount = remainingAmount; - } - 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 void setCompletedAt(OffsetDateTime completedAt) { - this.completedAt = completedAt; - } - public static class Builder { - private String liquidationId; - - private XMLiquidationStatus status; - - private String shortfallAmount; - - private String filledAmount; - - private String remainingAmount; - - private OffsetDateTime createdAt; - - private OffsetDateTime completedAt; - - 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 Builder filledAmount(String filledAmount) { - this.filledAmount = filledAmount; - return this; - } - - public Builder remainingAmount(String remainingAmount) { - this.remainingAmount = remainingAmount; - return this; - } - - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder completedAt(OffsetDateTime completedAt) { - this.completedAt = completedAt; - return this; - } - - public XMLiquidationSummary build() { - return new XMLiquidationSummary(this); - } + public XMLiquidationSummary build() { + return new XMLiquidationSummary(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/XMLoan.java b/src/main/java/com/coinbase/prime/model/XMLoan.java index b148d913..2ffa0d05 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 fe5603fa..31455a35 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 1f67ec52..89cc6920 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 5005a1b5..4c7069e8 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 fe662908..36d60ea4 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 0d3244b7..2815e302 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 5f542ed6..26d8ee77 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 a26ab850..8206e0a3 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 78f58ff5..db7f5fd2 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 4dc402ad..0ed46896 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 01febb5a..d0c5c7cf 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AddressBookType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AddressBookType.java @@ -22,4 +22,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 c4f17a6c..f1240a21 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 c7e15234..6004744d 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 dd155818..d4a71e87 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 a297c110..69128f2b 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AllocationStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/AllocationStatus.java @@ -24,4 +24,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 16b287d0..5c2b2e12 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 0e68bce5..8d1f6862 100644 --- a/src/main/java/com/coinbase/prime/model/enums/Benchmark.java +++ b/src/main/java/com/coinbase/prime/model/enums/Benchmark.java @@ -24,4 +24,3 @@ public enum Benchmark { SOFR_365, CRYPTO_RFR } - diff --git a/src/main/java/com/coinbase/prime/model/enums/BetaRewardsRateTierType.java b/src/main/java/com/coinbase/prime/model/enums/BetaRewardsRateTierType.java index 892c0457..3044d3c9 100644 --- a/src/main/java/com/coinbase/prime/model/enums/BetaRewardsRateTierType.java +++ b/src/main/java/com/coinbase/prime/model/enums/BetaRewardsRateTierType.java @@ -23,4 +23,3 @@ public enum BetaRewardsRateTierType { REWARDS_RATE_TIER_TYPE_OPEN_INTEREST, REWARDS_RATE_TIER_TYPE_PERCENT_VOLUME } - 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 410cd250..1d33cdc0 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 29368b36..126194d7 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java +++ b/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java @@ -19,18 +19,13 @@ 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 { - /** - * 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 d0e100ce..b9c04f5e 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/DerivativeProductType.java b/src/main/java/com/coinbase/prime/model/enums/DerivativeProductType.java index f0ebf606..64ef1d16 100644 --- a/src/main/java/com/coinbase/prime/model/enums/DerivativeProductType.java +++ b/src/main/java/com/coinbase/prime/model/enums/DerivativeProductType.java @@ -19,54 +19,32 @@ package com.coinbase.prime.model.enums; /** - * The general type of a derivative product. - * - DERIVATIVE_PRODUCT_TYPE_UNSPECIFIED: Unknown product type. - * - DERIVATIVE_PRODUCT_TYPE_SPOT: Spot product. - * - DERIVATIVE_PRODUCT_TYPE_FUTURE: Future product. - * - DERIVATIVE_PRODUCT_TYPE_EQUITY: Equity product. - * - DERIVATIVE_PRODUCT_TYPE_PREDICTION_MARKET: Prediction market product. - * - DERIVATIVE_PRODUCT_TYPE_OPTION: Option product. - * - DERIVATIVE_PRODUCT_TYPE_BASIS: Basis product. - * - DERIVATIVE_PRODUCT_TYPE_EQUITY_OPTION: Equity option product. - * - DERIVATIVE_PRODUCT_TYPE_FUTURE_COMBO: Future combo product. - * - DERIVATIVE_PRODUCT_TYPE_OPTION_COMBO: Option combo product. + * The general type of a derivative product. - DERIVATIVE_PRODUCT_TYPE_UNSPECIFIED: Unknown product + * type. - DERIVATIVE_PRODUCT_TYPE_SPOT: Spot product. - DERIVATIVE_PRODUCT_TYPE_FUTURE: Future + * product. - DERIVATIVE_PRODUCT_TYPE_EQUITY: Equity product. - + * DERIVATIVE_PRODUCT_TYPE_PREDICTION_MARKET: Prediction market product. - + * DERIVATIVE_PRODUCT_TYPE_OPTION: Option product. - DERIVATIVE_PRODUCT_TYPE_BASIS: Basis product. - + * DERIVATIVE_PRODUCT_TYPE_EQUITY_OPTION: Equity option product. - + * DERIVATIVE_PRODUCT_TYPE_FUTURE_COMBO: Future combo product. - + * DERIVATIVE_PRODUCT_TYPE_OPTION_COMBO: Option combo product. */ public enum DerivativeProductType { - /** - * Spot product. - */ + /** Spot product. */ DERIVATIVE_PRODUCT_TYPE_SPOT, - /** - * Future product. - */ + /** Future product. */ DERIVATIVE_PRODUCT_TYPE_FUTURE, - /** - * Equity product. - */ + /** Equity product. */ DERIVATIVE_PRODUCT_TYPE_EQUITY, - /** - * Prediction market product. - */ + /** Prediction market product. */ DERIVATIVE_PRODUCT_TYPE_PREDICTION_MARKET, - /** - * Option product. - */ + /** Option product. */ DERIVATIVE_PRODUCT_TYPE_OPTION, - /** - * Basis product. - */ + /** Basis product. */ DERIVATIVE_PRODUCT_TYPE_BASIS, - /** - * Equity option product. - */ + /** Equity option product. */ DERIVATIVE_PRODUCT_TYPE_EQUITY_OPTION, - /** - * Future combo product. - */ + /** Future combo product. */ DERIVATIVE_PRODUCT_TYPE_FUTURE_COMBO, - /** - * Option combo product. - */ + /** Option combo product. */ DERIVATIVE_PRODUCT_TYPE_OPTION_COMBO } - 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 a51dd3d7..a3f42239 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 d2928cbe..43e96af4 100644 --- a/src/main/java/com/coinbase/prime/model/enums/EstimateType.java +++ b/src/main/java/com/coinbase/prime/model/enums/EstimateType.java @@ -22,4 +22,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 b9a787da..0d6ad821 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 275134fa..72ea5bb6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallState.java @@ -24,4 +24,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 70aa5fee..1f652abc 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallType.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallType.java @@ -22,4 +22,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 7152a851..d8203355 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java @@ -19,29 +19,19 @@ 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 { - /** - * 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 913f56bd..d6825c27 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmPositionSide.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmPositionSide.java @@ -22,4 +22,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 601a36cc..1990a227 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java @@ -19,23 +19,16 @@ 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 { - /** - * 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 7f8d2798..5f17524e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java @@ -19,33 +19,21 @@ 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 { - /** - * 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 5ca2618c..976d6b32 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FuturesSweepStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/FuturesSweepStatus.java @@ -24,4 +24,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 9c4d0cf6..9fccde5b 100644 --- a/src/main/java/com/coinbase/prime/model/enums/HierarchyType.java +++ b/src/main/java/com/coinbase/prime/model/enums/HierarchyType.java @@ -19,10 +19,10 @@ 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_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 1741194f..b56c0fba 100644 --- a/src/main/java/com/coinbase/prime/model/enums/InvoiceState.java +++ b/src/main/java/com/coinbase/prime/model/enums/InvoiceState.java @@ -18,13 +18,10 @@ package com.coinbase.prime.model.enums; -/** - * States - */ +/** States */ public enum InvoiceState { INVOICE_STATE_IMPORTED, INVOICE_STATE_BILLED, 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 a290a0b4..f9fae8f1 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_AUC_FEE, INVOICE_TYPE_MINIMUM_FEE, @@ -28,4 +26,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 aa162682..c8b0c65b 100644 --- a/src/main/java/com/coinbase/prime/model/enums/LoanType.java +++ b/src/main/java/com/coinbase/prime/model/enums/LoanType.java @@ -26,4 +26,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 9c297d17..d03a5f81 100644 --- a/src/main/java/com/coinbase/prime/model/enums/MarginAddOnType.java +++ b/src/main/java/com/coinbase/prime/model/enums/MarginAddOnType.java @@ -24,4 +24,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 27b38c30..6fa01183 100644 --- a/src/main/java/com/coinbase/prime/model/enums/NetworkFamily.java +++ b/src/main/java/com/coinbase/prime/model/enums/NetworkFamily.java @@ -22,4 +22,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 9e41a9e4..cd25f39e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/NetworkType.java +++ b/src/main/java/com/coinbase/prime/model/enums/NetworkType.java @@ -22,4 +22,3 @@ public enum NetworkType { NETWORK_TYPE_EVM, NETWORK_TYPE_SOLANA } - diff --git a/src/main/java/com/coinbase/prime/model/enums/OptionType.java b/src/main/java/com/coinbase/prime/model/enums/OptionType.java index f980e020..a6e99006 100644 --- a/src/main/java/com/coinbase/prime/model/enums/OptionType.java +++ b/src/main/java/com/coinbase/prime/model/enums/OptionType.java @@ -19,19 +19,12 @@ package com.coinbase.prime.model.enums; /** - * The type of an option position. - * - OPTION_TYPE_UNSPECIFIED: Unspecified option type. - * - OPTION_TYPE_CALL: Call option. - * - OPTION_TYPE_PUT: Put option. + * The type of an option position. - OPTION_TYPE_UNSPECIFIED: Unspecified option type. - + * OPTION_TYPE_CALL: Call option. - OPTION_TYPE_PUT: Put option. */ public enum OptionType { - /** - * Call option. - */ + /** Call option. */ OPTION_TYPE_CALL, - /** - * Put option. - */ + /** Put option. */ OPTION_TYPE_PUT } - 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 e68e939f..54b98914 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 14f4d8dd..2417a3e8 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 78268a60..2550fa9e 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 f95388d3..2e558cdd 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 fa23d080..7b7404d0 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 b1a24dd3..9f711240 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 7c5c390a..5374abc5 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java @@ -22,4 +22,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 4a4f05b4..735a272b 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 e2c813fa..a42b8396 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java @@ -19,22 +19,26 @@ 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 { /** - * 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 96443809..3f1d78ef 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 e05141ec..0155669a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java @@ -19,32 +19,42 @@ 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 { - /** - * 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 f14469a9..25837256 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java @@ -19,17 +19,17 @@ 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 { - /** - * 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 ccf64578..aae4b06f 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,17 @@ 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 { - /** - * 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 f54d3ee3..6c76a1d0 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 83fd295c..8d487c22 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ProductType.java +++ b/src/main/java/com/coinbase/prime/model/enums/ProductType.java @@ -19,23 +19,14 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_PRODUCT_TYPE: Unknown product type - * - SPOT: Spot product - * - FUTURE: Future product - * - OPTION: Option product + * - UNKNOWN_PRODUCT_TYPE: Unknown product type - SPOT: Spot product - FUTURE: Future product - + * OPTION: Option product */ public enum ProductType { - /** - * Spot product - */ + /** Spot product */ SPOT, - /** - * Future product - */ + /** Future product */ FUTURE, - /** - * Option product - */ + /** Option product */ OPTION } - 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 8cd582ca..0c9c163c 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RateType.java +++ b/src/main/java/com/coinbase/prime/model/enums/RateType.java @@ -24,4 +24,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 9f84323b..40e21765 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 a362cef2..34b5115c 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java +++ b/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java @@ -19,18 +19,13 @@ 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 { - /** - * 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 7c10474a..5eb5ca0e 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/SettlementModel.java b/src/main/java/com/coinbase/prime/model/enums/SettlementModel.java index 11dc9bcb..0c048688 100644 --- a/src/main/java/com/coinbase/prime/model/enums/SettlementModel.java +++ b/src/main/java/com/coinbase/prime/model/enums/SettlementModel.java @@ -19,18 +19,12 @@ package com.coinbase.prime.model.enums; /** - * - SETTLEMENT_MODEL_UNSPECIFIED: Unspecified settlement model - * - SETTLEMENT_MODEL_LINEAR: Settles in the quote currency - * - SETTLEMENT_MODEL_INVERSE: Settles in the base currency + * - SETTLEMENT_MODEL_UNSPECIFIED: Unspecified settlement model - SETTLEMENT_MODEL_LINEAR: Settles + * in the quote currency - SETTLEMENT_MODEL_INVERSE: Settles in the base currency */ public enum SettlementModel { - /** - * Settles in the quote currency - */ + /** Settles in the quote currency */ SETTLEMENT_MODEL_LINEAR, - /** - * Settles in the base currency - */ + /** Settles in the base currency */ SETTLEMENT_MODEL_INVERSE } - diff --git a/src/main/java/com/coinbase/prime/model/enums/SettlementPeriod.java b/src/main/java/com/coinbase/prime/model/enums/SettlementPeriod.java index 4c05dcaf..9faa521d 100644 --- a/src/main/java/com/coinbase/prime/model/enums/SettlementPeriod.java +++ b/src/main/java/com/coinbase/prime/model/enums/SettlementPeriod.java @@ -19,28 +19,17 @@ package com.coinbase.prime.model.enums; /** - * - SETTLEMENT_PERIOD_UNSPECIFIED: Unspecified settlement period - * - SETTLEMENT_PERIOD_PERPETUAL: Contract never expires - * - SETTLEMENT_PERIOD_DAY: Contract expires daily - * - SETTLEMENT_PERIOD_WEEK: Contract expires weekly - * - SETTLEMENT_PERIOD_MONTH: Contract expires monthly + * - SETTLEMENT_PERIOD_UNSPECIFIED: Unspecified settlement period - SETTLEMENT_PERIOD_PERPETUAL: + * Contract never expires - SETTLEMENT_PERIOD_DAY: Contract expires daily - SETTLEMENT_PERIOD_WEEK: + * Contract expires weekly - SETTLEMENT_PERIOD_MONTH: Contract expires monthly */ public enum SettlementPeriod { - /** - * Contract never expires - */ + /** Contract never expires */ SETTLEMENT_PERIOD_PERPETUAL, - /** - * Contract expires daily - */ + /** Contract expires daily */ SETTLEMENT_PERIOD_DAY, - /** - * Contract expires weekly - */ + /** Contract expires weekly */ SETTLEMENT_PERIOD_WEEK, - /** - * Contract expires monthly - */ + /** Contract expires monthly */ SETTLEMENT_PERIOD_MONTH } - 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 48abbe12..3a120f8f 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 0d644b64..37697a09 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 e4e2392b..78fb07cb 100644 --- a/src/main/java/com/coinbase/prime/model/enums/StakeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/StakeType.java @@ -22,4 +22,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 333a5750..a1b3807a 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 c5f18fc3..29c1e28f 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 8fb94e7a..3ec80f1c 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TransactionType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TransactionType.java @@ -19,189 +19,111 @@ 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 - * - MERGE_STAKE: On-chain transaction consolidating funds from different addresses belonging to the same wallet. + * - 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 - + * MERGE_STAKE: On-chain transaction consolidating funds from different addresses belonging to the + * same wallet. */ 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, /** * On-chain transaction consolidating funds from different addresses belonging to the same wallet. */ MERGE_STAKE } - 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 28d2e56e..7dfe4c14 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 5e57f7db..2a58d16a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TravelRuleStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/TravelRuleStatus.java @@ -18,11 +18,8 @@ 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_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 a65f7dde..39a4d7a1 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TravelRuleWalletType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TravelRuleWalletType.java @@ -19,18 +19,13 @@ 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 { - /** - * 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 d80487d8..75fd7fe0 100644 --- a/src/main/java/com/coinbase/prime/model/enums/UnstakeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/UnstakeType.java @@ -22,4 +22,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 e3194772..30945e8e 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 68fd489a..15c5d4bb 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java +++ b/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java @@ -18,9 +18,7 @@ package com.coinbase.prime.model.enums; -/** - * ValidatorProvider enumerates the ETH validator service providers accepted for unstaking. - */ +/** ValidatorProvider enumerates the ETH validator service providers accepted for unstaking. */ public enum ValidatorProvider { VALIDATOR_PROVIDER_COINBASE_CLOUD, VALIDATOR_PROVIDER_MAVAN, @@ -29,4 +27,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 c11b5792..cde51d7e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ValidatorStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/ValidatorStatus.java @@ -25,4 +25,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 06a66e1e..7511547f 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 b6e849d3..04d77491 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 481e8b22..71f277a4 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 f6137243..aaf23c00 100644 --- a/src/main/java/com/coinbase/prime/model/enums/WalletVisibility.java +++ b/src/main/java/com/coinbase/prime/model/enums/WalletVisibility.java @@ -22,4 +22,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 03f83451..b6d06287 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java @@ -19,27 +19,17 @@ 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 { - /** - * 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 0bdf4d78..39d6fbae 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMCallType.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMCallType.java @@ -19,22 +19,14 @@ 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 { - /** - * 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 33b8f684..6b5274f4 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java @@ -19,22 +19,26 @@ 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 { /** - * 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 1b28c00e..b242b09e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java @@ -19,34 +19,37 @@ 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 { - /** - * 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 7c01eb10..c5ca5724 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java @@ -19,32 +19,21 @@ 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 { - /** - * 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 850e2d1d..3621d615 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java @@ -19,32 +19,42 @@ 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 { - /** - * 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 2db8ee43..b4efcc98 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMParty.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMParty.java @@ -19,17 +19,12 @@ 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 { - /** - * 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 } - diff --git a/src/test/java/com/coinbase/prime/apikey/ApiKeyServiceSerializationTest.java b/src/test/java/com/coinbase/prime/apikey/ApiKeyServiceSerializationTest.java index d7695841..49504f51 100644 --- a/src/test/java/com/coinbase/prime/apikey/ApiKeyServiceSerializationTest.java +++ b/src/test/java/com/coinbase/prime/apikey/ApiKeyServiceSerializationTest.java @@ -43,8 +43,7 @@ public void testRotateApiKeyRequestEmptyBuilder() throws JsonProcessingException @Test public void testRotateApiKeyRequestSerialization() throws JsonProcessingException { - RotateApiKeyRequest request = - new RotateApiKeyRequest.Builder().durationSeconds(3600L).build(); + RotateApiKeyRequest request = new RotateApiKeyRequest.Builder().durationSeconds(3600L).build(); String json = objectMapper.writeValueAsString(request); assertTrue(json.contains("\"duration_seconds\":3600")); } diff --git a/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java b/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java index 45b3a688..dbbdd948 100644 --- a/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java +++ b/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java @@ -508,10 +508,7 @@ public void testGetConversionFeesResponseDeserialization() throws JsonProcessing @Test public void testGetXmLiquidationRequestOmitsEntityId() throws JsonProcessingException { GetXmLiquidationRequest request = - new GetXmLiquidationRequest.Builder() - .entityId("entity-123") - .liquidationId("liq-1") - .build(); + new GetXmLiquidationRequest.Builder().entityId("entity-123").liquidationId("liq-1").build(); String json = objectMapper.writeValueAsString(request); assertTrue(json.contains("\"liquidation_id\":\"liq-1\"")); assertFalse(json.contains("entity_id")); @@ -531,7 +528,8 @@ public void testListXmLiquidationsRequestSerialization() throws JsonProcessingEx ListXmLiquidationsRequest request = new ListXmLiquidationsRequest.Builder() .entityId("entity-123") - .status(com.coinbase.prime.model.enums.XMLiquidationStatus.XM_LIQUIDATION_STATUS_LIQUIDATED) + .status( + com.coinbase.prime.model.enums.XMLiquidationStatus.XM_LIQUIDATION_STATUS_LIQUIDATED) .build(); String json = objectMapper.writeValueAsString(request); assertTrue(json.contains("\"status\":\"XM_LIQUIDATION_STATUS_LIQUIDATED\"")); diff --git a/src/test/java/com/coinbase/prime/futures/FuturesServiceSerializationTest.java b/src/test/java/com/coinbase/prime/futures/FuturesServiceSerializationTest.java index 94b14e50..b53b96cc 100644 --- a/src/test/java/com/coinbase/prime/futures/FuturesServiceSerializationTest.java +++ b/src/test/java/com/coinbase/prime/futures/FuturesServiceSerializationTest.java @@ -362,7 +362,8 @@ public void testGetDerivativePositionsRequestSerialization() throws JsonProcessi @Test public void testGetDerivativePositionsResponseDeserialization() throws JsonProcessingException { - String json = "{\"positions\":[{\"product_id\":\"BTC-31JAN24-CDE\",\"number_of_contracts\":\"10\"}]}"; + String json = + "{\"positions\":[{\"product_id\":\"BTC-31JAN24-CDE\",\"number_of_contracts\":\"10\"}]}"; GetDerivativePositionsResponse response = objectMapper.readValue(json, GetDerivativePositionsResponse.class); assertEquals(1, response.getPositions().length); From 8f315f86ced72602c2e94053eeeaa321a493d9fb Mon Sep 17 00:00:00 2001 From: Carl Fluke Date: Tue, 1 Sep 2026 17:03:51 -0400 Subject: [PATCH 4/7] add decrypt helper for rotating api key --- CHANGELOG.md | 1 + README.md | 2 +- .../examples/apikey/RotateApiKey.java | 10 ++ .../coinbase/prime/apikey/ApiKeyRotation.java | 166 ++++++++++++++++++ .../apikey/RotatedApiKeyCredentials.java | 85 +++++++++ .../prime/apikey/ApiKeyRotationTest.java | 153 ++++++++++++++++ 6 files changed, 416 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/coinbase/prime/apikey/ApiKeyRotation.java create mode 100644 src/main/java/com/coinbase/prime/apikey/RotatedApiKeyCredentials.java create mode 100644 src/test/java/com/coinbase/prime/apikey/ApiKeyRotationTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b6e7d55..baf86af3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ **ApiKey Service** - **`rotateApiKey()`**: Rotate the invoking API key (`POST /v1/api-keys/rotate`) +- **`ApiKeyRotation.decrypt()`**: Decrypt `encrypted_credentials` with JDK HKDF-SHA256 + AES-256-GCM (no extra libraries) **Financing Service** - **`getConversionFees()`**: Get organization conversion fee tiers and month-to-date volume (`GET /v1/conversion/fees`) diff --git a/README.md b/README.md index 6c499d5c..9152f17b 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ mvn exec:java -Dexec.mainClass="com.coinbase.examples.transactions.ListPortfolio - `com.coinbase.examples.wallets.GetWalletDepositInstructions [deposit-type]` - Get deposit instructions (deposit-type: CRYPTO, WIRE, SEN, SWIFT, SEPA) **API Key:** -- `com.coinbase.examples.apikey.RotateApiKey` - Rotate the invoking API key (starts a real rotation) +- `com.coinbase.examples.apikey.RotateApiKey` - Rotate the invoking API key (starts a real rotation). Decrypts `encrypted_credentials` via `ApiKeyRotation.decrypt` using the current `signingKey`. **Financing:** - `com.coinbase.examples.financing.GetConversionFees` - Get organization conversion fee tiers diff --git a/src/main/java/com/coinbase/examples/apikey/RotateApiKey.java b/src/main/java/com/coinbase/examples/apikey/RotateApiKey.java index a9397b5c..1a532e06 100644 --- a/src/main/java/com/coinbase/examples/apikey/RotateApiKey.java +++ b/src/main/java/com/coinbase/examples/apikey/RotateApiKey.java @@ -16,9 +16,11 @@ package com.coinbase.examples.apikey; +import com.coinbase.prime.apikey.ApiKeyRotation; import com.coinbase.prime.apikey.ApiKeyService; import com.coinbase.prime.apikey.RotateApiKeyRequest; import com.coinbase.prime.apikey.RotateApiKeyResponse; +import com.coinbase.prime.apikey.RotatedApiKeyCredentials; import com.coinbase.prime.client.CoinbasePrimeClient; import com.coinbase.prime.credentials.CoinbasePrimeCredentials; import com.coinbase.prime.factory.PrimeServiceFactory; @@ -45,6 +47,14 @@ public static void main(String[] args) { System.out.println( Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); + + String signingKey = + Utils.getObjectMapper().readTree(System.getenv("COINBASE_PRIME_CREDENTIALS")) + .get("signingKey") + .asText(); + RotatedApiKeyCredentials rotated = ApiKeyRotation.decrypt(signingKey, response); + System.out.println("Decrypted new access_key: " + rotated.getAccessKey()); + System.out.println("Store the new secret_key and passphrase securely; they are not printed."); } catch (Exception e) { e.printStackTrace(); } diff --git a/src/main/java/com/coinbase/prime/apikey/ApiKeyRotation.java b/src/main/java/com/coinbase/prime/apikey/ApiKeyRotation.java new file mode 100644 index 00000000..d5f87438 --- /dev/null +++ b/src/main/java/com/coinbase/prime/apikey/ApiKeyRotation.java @@ -0,0 +1,166 @@ +/* + * 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.apikey; + +import static com.coinbase.core.utils.Utils.isNullOrEmpty; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.coinbase.prime.utils.Utils; +import java.nio.charset.StandardCharsets; +import java.security.GeneralSecurityException; +import java.util.Arrays; +import java.util.Base64; +import javax.crypto.Cipher; +import javax.crypto.Mac; +import javax.crypto.spec.GCMParameterSpec; +import javax.crypto.spec.SecretKeySpec; + +/** + * Decrypts {@code encrypted_credentials} from {@link RotateApiKeyResponse} using only the JDK: + * HKDF-SHA256 (RFC 5869) and AES-256-GCM. + * + *

Wire format after Base64 decode: {@code version(1) | salt(32) | nonce(12) | + * ciphertext+tag}. Version must be {@code 0x01}. HKDF info is {@code api-key-rotation}. See API Key Rotation. + */ +public final class ApiKeyRotation { + static final byte[] HKDF_INFO = "api-key-rotation".getBytes(StandardCharsets.UTF_8); + static final int VERSION = 1; + static final int VERSION_LEN = 1; + static final int SALT_LEN = 32; + static final int NONCE_LEN = 12; + static final int GCM_TAG_LEN = 16; + static final int AES_KEY_LEN = 32; + static final int MIN_WIRE_LEN = VERSION_LEN + SALT_LEN + NONCE_LEN + GCM_TAG_LEN; + private static final int HASH_LEN = 32; + + private ApiKeyRotation() {} + + /** + * Decrypts rotated credentials from a rotate-API-key response. + * + * @param secretKey current API signing key ({@code secret_key} / {@code signingKey}) + * @param response rotate API key response containing {@code encrypted_credentials} + */ + public static RotatedApiKeyCredentials decrypt(String secretKey, RotateApiKeyResponse response) + throws CoinbaseClientException { + if (response == null) { + throw new CoinbaseClientException("Rotate API key response is required"); + } + return decrypt(secretKey, response.getEncryptedCredentials()); + } + + /** + * Decrypts a Base64 {@code encrypted_credentials} payload. + * + * @param secretKey current API signing key ({@code secret_key} / {@code signingKey}) + * @param encryptedCredentials Base64-encoded wire payload + */ + public static RotatedApiKeyCredentials decrypt(String secretKey, String encryptedCredentials) + throws CoinbaseClientException { + if (isNullOrEmpty(secretKey)) { + throw new CoinbaseClientException("Secret key is required to decrypt rotated credentials"); + } + if (isNullOrEmpty(encryptedCredentials)) { + throw new CoinbaseClientException("encrypted_credentials is required"); + } + + byte[] raw = decodeBase64PadTolerant(encryptedCredentials); + if (raw.length < MIN_WIRE_LEN) { + throw new CoinbaseClientException("encrypted_credentials payload is too short"); + } + if ((raw[0] & 0xFF) != VERSION) { + throw new CoinbaseClientException( + "unsupported encrypted_credentials wire version: " + (raw[0] & 0xFF)); + } + + byte[] salt = Arrays.copyOfRange(raw, VERSION_LEN, VERSION_LEN + SALT_LEN); + byte[] nonce = + Arrays.copyOfRange(raw, VERSION_LEN + SALT_LEN, VERSION_LEN + SALT_LEN + NONCE_LEN); + byte[] ciphertext = Arrays.copyOfRange(raw, VERSION_LEN + SALT_LEN + NONCE_LEN, raw.length); + + byte[] ikm = secretKey.getBytes(StandardCharsets.UTF_8); + byte[] aesKey = null; + try { + aesKey = hkdfSha256(ikm, salt, HKDF_INFO, AES_KEY_LEN); + Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); + cipher.init( + Cipher.DECRYPT_MODE, + new SecretKeySpec(aesKey, "AES"), + new GCMParameterSpec(GCM_TAG_LEN * 8, nonce)); + byte[] plaintext = cipher.doFinal(ciphertext); + return Utils.getObjectMapper().readValue(plaintext, RotatedApiKeyCredentials.class); + } catch (CoinbaseClientException e) { + throw e; + } catch (Exception e) { + throw new CoinbaseClientException("Failed to decrypt rotated API key credentials", e); + } finally { + Arrays.fill(ikm, (byte) 0); + if (aesKey != null) { + Arrays.fill(aesKey, (byte) 0); + } + } + } + + /** + * HKDF-SHA256 (RFC 5869) extract-then-expand. Package-visible for RFC test vectors. + */ + static byte[] hkdfSha256(byte[] ikm, byte[] salt, byte[] info, int length) + throws GeneralSecurityException { + if (length <= 0 || length > 255 * HASH_LEN) { + throw new IllegalArgumentException("invalid HKDF output length"); + } + byte[] prk = hmacSha256(salt != null ? salt : new byte[HASH_LEN], ikm); + try { + return hkdfExpand(prk, info, length); + } finally { + Arrays.fill(prk, (byte) 0); + } + } + + private static byte[] hkdfExpand(byte[] prk, byte[] info, int length) + throws GeneralSecurityException { + byte[] infoBytes = info != null ? info : new byte[0]; + int n = (length + HASH_LEN - 1) / HASH_LEN; + byte[] okm = new byte[length]; + byte[] t = new byte[0]; + int offset = 0; + for (int i = 1; i <= n; i++) { + byte[] input = new byte[t.length + infoBytes.length + 1]; + System.arraycopy(t, 0, input, 0, t.length); + System.arraycopy(infoBytes, 0, input, t.length, infoBytes.length); + input[input.length - 1] = (byte) i; + t = hmacSha256(prk, input); + int toCopy = Math.min(HASH_LEN, length - offset); + System.arraycopy(t, 0, okm, offset, toCopy); + offset += toCopy; + } + return okm; + } + + private static byte[] hmacSha256(byte[] key, byte[] data) throws GeneralSecurityException { + Mac mac = Mac.getInstance("HmacSHA256"); + mac.init(new SecretKeySpec(key, "HmacSHA256")); + return mac.doFinal(data); + } + + static byte[] decodeBase64PadTolerant(String encoded) { + int mod = encoded.length() % 4; + String padded = mod == 0 ? encoded : encoded + "====".substring(mod); + return Base64.getDecoder().decode(padded); + } +} diff --git a/src/main/java/com/coinbase/prime/apikey/RotatedApiKeyCredentials.java b/src/main/java/com/coinbase/prime/apikey/RotatedApiKeyCredentials.java new file mode 100644 index 00000000..7fd7837c --- /dev/null +++ b/src/main/java/com/coinbase/prime/apikey/RotatedApiKeyCredentials.java @@ -0,0 +1,85 @@ +/* + * 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.apikey; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.coinbase.core.utils.Utils; +import com.coinbase.prime.credentials.CoinbasePrimeCredentials; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Plaintext credentials returned after decrypting a rotate-API-key payload. */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class RotatedApiKeyCredentials { + @JsonProperty("access_key") + private String accessKey; + + @JsonProperty("secret_key") + private String secretKey; + + @JsonProperty("passphrase") + private String passphrase; + + @JsonProperty("service_account_id") + private String serviceAccountId; + + public RotatedApiKeyCredentials() {} + + public String getAccessKey() { + return accessKey; + } + + public void setAccessKey(String accessKey) { + this.accessKey = accessKey; + } + + public String getSecretKey() { + return secretKey; + } + + public void setSecretKey(String secretKey) { + this.secretKey = secretKey; + } + + public String getPassphrase() { + return passphrase; + } + + public void setPassphrase(String passphrase) { + this.passphrase = passphrase; + } + + public String getServiceAccountId() { + return serviceAccountId; + } + + public void setServiceAccountId(String serviceAccountId) { + this.serviceAccountId = serviceAccountId; + } + + /** + * Builds SDK credentials from the rotated key. {@code secret_key} maps to {@code signingKey}. + * + * @throws CoinbaseClientException if required fields are missing + */ + public CoinbasePrimeCredentials toPrimeCredentials() throws CoinbaseClientException { + if (Utils.isNullOrEmpty(serviceAccountId)) { + return new CoinbasePrimeCredentials(accessKey, passphrase, secretKey); + } + return new CoinbasePrimeCredentials(accessKey, passphrase, secretKey, serviceAccountId); + } +} diff --git a/src/test/java/com/coinbase/prime/apikey/ApiKeyRotationTest.java b/src/test/java/com/coinbase/prime/apikey/ApiKeyRotationTest.java new file mode 100644 index 00000000..32a7caac --- /dev/null +++ b/src/test/java/com/coinbase/prime/apikey/ApiKeyRotationTest.java @@ -0,0 +1,153 @@ +/* + * 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.apikey; + +import static org.junit.jupiter.api.Assertions.*; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.coinbase.prime.credentials.CoinbasePrimeCredentials; +import java.nio.charset.StandardCharsets; +import java.security.SecureRandom; +import java.util.Base64; +import javax.crypto.Cipher; +import javax.crypto.spec.GCMParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import org.junit.jupiter.api.Test; + +public class ApiKeyRotationTest { + + @Test + public void hkdfSha256MatchesRfc5869TestCase1() throws Exception { + // RFC 5869 Appendix A.1 + byte[] ikm = hex("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"); + byte[] salt = hex("000102030405060708090a0b0c"); + byte[] info = hex("f0f1f2f3f4f5f6f7f8f9"); + byte[] okm = + ApiKeyRotation.hkdfSha256(ikm, salt, info, 42); + assertArrayEquals( + hex("3cb25f25faacd57a90434f64d0362f2a2d2d0a90cf1a5a4c5db02d56ecc4c5bf34007208d5b887185865"), + okm); + } + + @Test + public void decryptRoundTrip() throws Exception { + String secretKey = "current-signing-key"; + String plaintext = + "{" + + "\"access_key\":\"new-access\"," + + "\"secret_key\":\"new-secret\"," + + "\"passphrase\":\"new-pass\"," + + "\"service_account_id\":\"svc-1\"" + + "}"; + String encrypted = encrypt(secretKey, plaintext); + + RotateApiKeyResponse response = new RotateApiKeyResponse(); + response.setEncryptedCredentials(encrypted); + response.setActivityId("activity-1"); + + RotatedApiKeyCredentials creds = ApiKeyRotation.decrypt(secretKey, response); + assertEquals("new-access", creds.getAccessKey()); + assertEquals("new-secret", creds.getSecretKey()); + assertEquals("new-pass", creds.getPassphrase()); + assertEquals("svc-1", creds.getServiceAccountId()); + + CoinbasePrimeCredentials prime = creds.toPrimeCredentials(); + assertEquals("new-access", prime.getAccessKey()); + assertEquals("new-pass", prime.getPassphrase()); + } + + @Test + public void decryptAcceptsMissingBase64Padding() throws Exception { + String secretKey = "current-signing-key"; + String plaintext = + "{\"access_key\":\"a\",\"secret_key\":\"s\",\"passphrase\":\"p\"}"; + String encrypted = encrypt(secretKey, plaintext); + while (encrypted.endsWith("=")) { + encrypted = encrypted.substring(0, encrypted.length() - 1); + } + + RotatedApiKeyCredentials creds = ApiKeyRotation.decrypt(secretKey, encrypted); + assertEquals("a", creds.getAccessKey()); + assertEquals("s", creds.getSecretKey()); + assertEquals("p", creds.getPassphrase()); + } + + @Test + public void decryptRejectsWrongVersion() { + byte[] raw = new byte[ApiKeyRotation.MIN_WIRE_LEN]; + raw[0] = 2; + String payload = Base64.getEncoder().encodeToString(raw); + CoinbaseClientException ex = + assertThrows( + CoinbaseClientException.class, () -> ApiKeyRotation.decrypt("secret", payload)); + assertTrue(ex.getMessage().contains("wire version")); + } + + @Test + public void decryptRejectsWrongSecret() throws Exception { + String encrypted = + encrypt( + "correct-secret", + "{\"access_key\":\"a\",\"secret_key\":\"s\",\"passphrase\":\"p\"}"); + assertThrows( + CoinbaseClientException.class, () -> ApiKeyRotation.decrypt("wrong-secret", encrypted)); + } + + private static String encrypt(String secretKey, String plaintextJson) throws Exception { + byte[] salt = new byte[ApiKeyRotation.SALT_LEN]; + byte[] nonce = new byte[ApiKeyRotation.NONCE_LEN]; + SecureRandom random = new SecureRandom(); + random.nextBytes(salt); + random.nextBytes(nonce); + + byte[] aesKey = + ApiKeyRotation.hkdfSha256( + secretKey.getBytes(StandardCharsets.UTF_8), + salt, + ApiKeyRotation.HKDF_INFO, + ApiKeyRotation.AES_KEY_LEN); + Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); + cipher.init( + Cipher.ENCRYPT_MODE, + new SecretKeySpec(aesKey, "AES"), + new GCMParameterSpec(ApiKeyRotation.GCM_TAG_LEN * 8, nonce)); + byte[] ciphertext = cipher.doFinal(plaintextJson.getBytes(StandardCharsets.UTF_8)); + + byte[] raw = + new byte[ApiKeyRotation.VERSION_LEN + salt.length + nonce.length + ciphertext.length]; + raw[0] = ApiKeyRotation.VERSION; + System.arraycopy(salt, 0, raw, ApiKeyRotation.VERSION_LEN, salt.length); + System.arraycopy(nonce, 0, raw, ApiKeyRotation.VERSION_LEN + salt.length, nonce.length); + System.arraycopy( + ciphertext, + 0, + raw, + ApiKeyRotation.VERSION_LEN + salt.length + nonce.length, + ciphertext.length); + return Base64.getEncoder().encodeToString(raw); + } + + private static byte[] hex(String s) { + int len = s.length(); + byte[] data = new byte[len / 2]; + for (int i = 0; i < len; i += 2) { + data[i / 2] = + (byte) ((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s.charAt(i + 1), 16)); + } + return data; + } +} From 4f7aee2d15edbe785ea4a45c27ae21fd1921655d Mon Sep 17 00:00:00 2001 From: Carl Fluke Date: Tue, 1 Sep 2026 17:04:39 -0400 Subject: [PATCH 5/7] fmt --- .../java/com/coinbase/examples/apikey/RotateApiKey.java | 3 ++- .../java/com/coinbase/prime/apikey/ApiKeyRotation.java | 8 +++----- .../com/coinbase/prime/apikey/ApiKeyRotationTest.java | 9 +++------ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/coinbase/examples/apikey/RotateApiKey.java b/src/main/java/com/coinbase/examples/apikey/RotateApiKey.java index 1a532e06..550dd3f6 100644 --- a/src/main/java/com/coinbase/examples/apikey/RotateApiKey.java +++ b/src/main/java/com/coinbase/examples/apikey/RotateApiKey.java @@ -49,7 +49,8 @@ public static void main(String[] args) { Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); String signingKey = - Utils.getObjectMapper().readTree(System.getenv("COINBASE_PRIME_CREDENTIALS")) + Utils.getObjectMapper() + .readTree(System.getenv("COINBASE_PRIME_CREDENTIALS")) .get("signingKey") .asText(); RotatedApiKeyCredentials rotated = ApiKeyRotation.decrypt(signingKey, response); diff --git a/src/main/java/com/coinbase/prime/apikey/ApiKeyRotation.java b/src/main/java/com/coinbase/prime/apikey/ApiKeyRotation.java index d5f87438..7e5c712b 100644 --- a/src/main/java/com/coinbase/prime/apikey/ApiKeyRotation.java +++ b/src/main/java/com/coinbase/prime/apikey/ApiKeyRotation.java @@ -33,8 +33,8 @@ * Decrypts {@code encrypted_credentials} from {@link RotateApiKeyResponse} using only the JDK: * HKDF-SHA256 (RFC 5869) and AES-256-GCM. * - *

Wire format after Base64 decode: {@code version(1) | salt(32) | nonce(12) | - * ciphertext+tag}. Version must be {@code 0x01}. HKDF info is {@code api-key-rotation}. See Wire format after Base64 decode: {@code version(1) | salt(32) | nonce(12) | ciphertext+tag}. + * Version must be {@code 0x01}. HKDF info is {@code api-key-rotation}. See API Key Rotation. */ public final class ApiKeyRotation { @@ -116,9 +116,7 @@ public static RotatedApiKeyCredentials decrypt(String secretKey, String encrypte } } - /** - * HKDF-SHA256 (RFC 5869) extract-then-expand. Package-visible for RFC test vectors. - */ + /** HKDF-SHA256 (RFC 5869) extract-then-expand. Package-visible for RFC test vectors. */ static byte[] hkdfSha256(byte[] ikm, byte[] salt, byte[] info, int length) throws GeneralSecurityException { if (length <= 0 || length > 255 * HASH_LEN) { diff --git a/src/test/java/com/coinbase/prime/apikey/ApiKeyRotationTest.java b/src/test/java/com/coinbase/prime/apikey/ApiKeyRotationTest.java index 32a7caac..d5a7fdf6 100644 --- a/src/test/java/com/coinbase/prime/apikey/ApiKeyRotationTest.java +++ b/src/test/java/com/coinbase/prime/apikey/ApiKeyRotationTest.java @@ -36,8 +36,7 @@ public void hkdfSha256MatchesRfc5869TestCase1() throws Exception { byte[] ikm = hex("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"); byte[] salt = hex("000102030405060708090a0b0c"); byte[] info = hex("f0f1f2f3f4f5f6f7f8f9"); - byte[] okm = - ApiKeyRotation.hkdfSha256(ikm, salt, info, 42); + byte[] okm = ApiKeyRotation.hkdfSha256(ikm, salt, info, 42); assertArrayEquals( hex("3cb25f25faacd57a90434f64d0362f2a2d2d0a90cf1a5a4c5db02d56ecc4c5bf34007208d5b887185865"), okm); @@ -73,8 +72,7 @@ public void decryptRoundTrip() throws Exception { @Test public void decryptAcceptsMissingBase64Padding() throws Exception { String secretKey = "current-signing-key"; - String plaintext = - "{\"access_key\":\"a\",\"secret_key\":\"s\",\"passphrase\":\"p\"}"; + String plaintext = "{\"access_key\":\"a\",\"secret_key\":\"s\",\"passphrase\":\"p\"}"; String encrypted = encrypt(secretKey, plaintext); while (encrypted.endsWith("=")) { encrypted = encrypted.substring(0, encrypted.length() - 1); @@ -101,8 +99,7 @@ public void decryptRejectsWrongVersion() { public void decryptRejectsWrongSecret() throws Exception { String encrypted = encrypt( - "correct-secret", - "{\"access_key\":\"a\",\"secret_key\":\"s\",\"passphrase\":\"p\"}"); + "correct-secret", "{\"access_key\":\"a\",\"secret_key\":\"s\",\"passphrase\":\"p\"}"); assertThrows( CoinbaseClientException.class, () -> ApiKeyRotation.decrypt("wrong-secret", encrypted)); } From 64c4ad7796d783bdc4af8e600834bc119695e439 Mon Sep 17 00:00:00 2001 From: Carl Fluke Date: Wed, 2 Sep 2026 11:18:14 -0400 Subject: [PATCH 6/7] normalize to CrossMargin for request / response classes --- CHANGELOG.md | 4 ++-- README.md | 4 ++-- ...on.java => GetCrossMarginLiquidation.java} | 12 +++++----- ....java => ListCrossMarginLiquidations.java} | 12 +++++----- .../prime/financing/FinancingService.java | 4 ++-- .../prime/financing/FinancingServiceImpl.java | 8 +++---- ... => GetCrossMarginLiquidationRequest.java} | 10 ++++---- ...=> GetCrossMarginLiquidationResponse.java} | 4 ++-- ...> ListCrossMarginLiquidationsRequest.java} | 10 ++++---- ... ListCrossMarginLiquidationsResponse.java} | 4 ++-- .../FinancingServiceSerializationTest.java | 24 +++++++++---------- .../prime/integration/FinancingIT.java | 14 +++++------ 12 files changed, 55 insertions(+), 55 deletions(-) rename src/main/java/com/coinbase/examples/financing/{GetXmLiquidation.java => GetCrossMarginLiquidation.java} (80%) rename src/main/java/com/coinbase/examples/financing/{ListXmLiquidations.java => ListCrossMarginLiquidations.java} (80%) rename src/main/java/com/coinbase/prime/financing/{GetXmLiquidationRequest.java => GetCrossMarginLiquidationRequest.java} (87%) rename src/main/java/com/coinbase/prime/financing/{GetXmLiquidationResponse.java => GetCrossMarginLiquidationResponse.java} (91%) rename src/main/java/com/coinbase/prime/financing/{ListXmLiquidationsRequest.java => ListCrossMarginLiquidationsRequest.java} (91%) rename src/main/java/com/coinbase/prime/financing/{ListXmLiquidationsResponse.java => ListCrossMarginLiquidationsResponse.java} (93%) diff --git a/CHANGELOG.md b/CHANGELOG.md index baf86af3..14b3668a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,8 @@ **Financing Service** - **`getConversionFees()`**: Get organization conversion fee tiers and month-to-date volume (`GET /v1/conversion/fees`) -- **`getXmLiquidation()`**: Get detailed XM liquidation data (`GET /v1/entities/{entity_id}/cross_margin/liquidation`) -- **`listXmLiquidations()`**: List XM liquidation history (`GET /v1/entities/{entity_id}/cross_margin/liquidations`) +- **`getCrossMarginLiquidation()`**: Get detailed XM liquidation data (`GET /v1/entities/{entity_id}/cross_margin/liquidation`) +- **`listCrossMarginLiquidations()`**: List XM liquidation history (`GET /v1/entities/{entity_id}/cross_margin/liquidations`) - **`getEntityRewardsRate()`**: Get entity rewards rate and tiers (beta) (`GET /v1/entities/{entity_id}/rewards/rate`) - **`getPortfolioRewardsRate()`**: Get portfolio rewards rate and tiers (beta) (`GET /v1/portfolios/{portfolio_id}/rewards/rate`) diff --git a/README.md b/README.md index 9152f17b..9a8c3e60 100644 --- a/README.md +++ b/README.md @@ -146,8 +146,8 @@ mvn exec:java -Dexec.mainClass="com.coinbase.examples.transactions.ListPortfolio **Financing:** - `com.coinbase.examples.financing.GetConversionFees` - Get organization conversion fee tiers -- `com.coinbase.examples.financing.GetXmLiquidation` - Get XM liquidation details -- `com.coinbase.examples.financing.ListXmLiquidations` - List XM liquidation history +- `com.coinbase.examples.financing.GetCrossMarginLiquidation` - Get XM liquidation details +- `com.coinbase.examples.financing.ListCrossMarginLiquidations` - List XM liquidation history - `com.coinbase.examples.financing.GetEntityRewardsRate` - Get entity rewards rate (beta) - `com.coinbase.examples.financing.GetPortfolioRewardsRate` - Get portfolio rewards rate (beta) diff --git a/src/main/java/com/coinbase/examples/financing/GetXmLiquidation.java b/src/main/java/com/coinbase/examples/financing/GetCrossMarginLiquidation.java similarity index 80% rename from src/main/java/com/coinbase/examples/financing/GetXmLiquidation.java rename to src/main/java/com/coinbase/examples/financing/GetCrossMarginLiquidation.java index c903b4d8..c3129aa0 100644 --- a/src/main/java/com/coinbase/examples/financing/GetXmLiquidation.java +++ b/src/main/java/com/coinbase/examples/financing/GetCrossMarginLiquidation.java @@ -20,11 +20,11 @@ import com.coinbase.prime.credentials.CoinbasePrimeCredentials; import com.coinbase.prime.factory.PrimeServiceFactory; import com.coinbase.prime.financing.FinancingService; -import com.coinbase.prime.financing.GetXmLiquidationRequest; -import com.coinbase.prime.financing.GetXmLiquidationResponse; +import com.coinbase.prime.financing.GetCrossMarginLiquidationRequest; +import com.coinbase.prime.financing.GetCrossMarginLiquidationResponse; import com.coinbase.prime.utils.Utils; -public class GetXmLiquidation { +public class GetCrossMarginLiquidation { public static void main(String[] args) { try { CoinbasePrimeCredentials credentials = @@ -33,9 +33,9 @@ public static void main(String[] args) { String entityId = System.getenv("COINBASE_PRIME_ENTITY_ID"); FinancingService service = PrimeServiceFactory.createFinancingService(client); - GetXmLiquidationResponse response = - service.getXmLiquidation( - new GetXmLiquidationRequest.Builder().entityId(entityId).build()); + GetCrossMarginLiquidationResponse response = + service.getCrossMarginLiquidation( + new GetCrossMarginLiquidationRequest.Builder().entityId(entityId).build()); System.out.println( Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); diff --git a/src/main/java/com/coinbase/examples/financing/ListXmLiquidations.java b/src/main/java/com/coinbase/examples/financing/ListCrossMarginLiquidations.java similarity index 80% rename from src/main/java/com/coinbase/examples/financing/ListXmLiquidations.java rename to src/main/java/com/coinbase/examples/financing/ListCrossMarginLiquidations.java index 9e15c465..62e46c89 100644 --- a/src/main/java/com/coinbase/examples/financing/ListXmLiquidations.java +++ b/src/main/java/com/coinbase/examples/financing/ListCrossMarginLiquidations.java @@ -20,11 +20,11 @@ import com.coinbase.prime.credentials.CoinbasePrimeCredentials; import com.coinbase.prime.factory.PrimeServiceFactory; import com.coinbase.prime.financing.FinancingService; -import com.coinbase.prime.financing.ListXmLiquidationsRequest; -import com.coinbase.prime.financing.ListXmLiquidationsResponse; +import com.coinbase.prime.financing.ListCrossMarginLiquidationsRequest; +import com.coinbase.prime.financing.ListCrossMarginLiquidationsResponse; import com.coinbase.prime.utils.Utils; -public class ListXmLiquidations { +public class ListCrossMarginLiquidations { public static void main(String[] args) { try { CoinbasePrimeCredentials credentials = @@ -33,9 +33,9 @@ public static void main(String[] args) { String entityId = System.getenv("COINBASE_PRIME_ENTITY_ID"); FinancingService service = PrimeServiceFactory.createFinancingService(client); - ListXmLiquidationsResponse response = - service.listXmLiquidations( - new ListXmLiquidationsRequest.Builder().entityId(entityId).build()); + ListCrossMarginLiquidationsResponse response = + service.listCrossMarginLiquidations( + new ListCrossMarginLiquidationsRequest.Builder().entityId(entityId).build()); System.out.println( Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); diff --git a/src/main/java/com/coinbase/prime/financing/FinancingService.java b/src/main/java/com/coinbase/prime/financing/FinancingService.java index d2d1f341..13d14aea 100644 --- a/src/main/java/com/coinbase/prime/financing/FinancingService.java +++ b/src/main/java/com/coinbase/prime/financing/FinancingService.java @@ -304,7 +304,7 @@ GetConversionFeesResponse getConversionFees() * @throws CoinbaseClientException if the request fails client-side validation * @throws CoinbasePrimeException if the Prime API returns an error response */ - GetXmLiquidationResponse getXmLiquidation(GetXmLiquidationRequest request) + GetCrossMarginLiquidationResponse getCrossMarginLiquidation(GetCrossMarginLiquidationRequest request) throws CoinbaseClientException, CoinbasePrimeException; /** @@ -317,7 +317,7 @@ GetXmLiquidationResponse getXmLiquidation(GetXmLiquidationRequest request) * @throws CoinbaseClientException if the request fails client-side validation * @throws CoinbasePrimeException if the Prime API returns an error response */ - ListXmLiquidationsResponse listXmLiquidations(ListXmLiquidationsRequest request) + ListCrossMarginLiquidationsResponse listCrossMarginLiquidations(ListCrossMarginLiquidationsRequest request) throws CoinbaseClientException, CoinbasePrimeException; /** diff --git a/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java b/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java index bc55853d..7d72d928 100644 --- a/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java +++ b/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java @@ -259,25 +259,25 @@ public GetConversionFeesResponse getConversionFees() throws CoinbasePrimeExcepti } @Override - public GetXmLiquidationResponse getXmLiquidation(GetXmLiquidationRequest request) + public GetCrossMarginLiquidationResponse getCrossMarginLiquidation(GetCrossMarginLiquidationRequest request) throws CoinbasePrimeException { return this.request( HttpMethod.GET, String.format("/entities/%s/cross_margin/liquidation", request.getEntityId()), request, List.of(200), - new TypeReference() {}); + new TypeReference() {}); } @Override - public ListXmLiquidationsResponse listXmLiquidations(ListXmLiquidationsRequest request) + public ListCrossMarginLiquidationsResponse listCrossMarginLiquidations(ListCrossMarginLiquidationsRequest request) throws CoinbasePrimeException { return this.request( HttpMethod.GET, String.format("/entities/%s/cross_margin/liquidations", request.getEntityId()), request, List.of(200), - new TypeReference() {}); + new TypeReference() {}); } @Override diff --git a/src/main/java/com/coinbase/prime/financing/GetXmLiquidationRequest.java b/src/main/java/com/coinbase/prime/financing/GetCrossMarginLiquidationRequest.java similarity index 87% rename from src/main/java/com/coinbase/prime/financing/GetXmLiquidationRequest.java rename to src/main/java/com/coinbase/prime/financing/GetCrossMarginLiquidationRequest.java index 2ada9314..38a50f78 100644 --- a/src/main/java/com/coinbase/prime/financing/GetXmLiquidationRequest.java +++ b/src/main/java/com/coinbase/prime/financing/GetCrossMarginLiquidationRequest.java @@ -23,7 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** Get Cross Margin Liquidation */ -public class GetXmLiquidationRequest { +public class GetCrossMarginLiquidationRequest { /** XM customer Prime Entity ID */ @JsonProperty(required = true, value = "entity_id") @JsonIgnore @@ -33,9 +33,9 @@ public class GetXmLiquidationRequest { @JsonProperty("liquidation_id") private String liquidationId; - public GetXmLiquidationRequest() {} + public GetCrossMarginLiquidationRequest() {} - public GetXmLiquidationRequest(Builder builder) { + public GetCrossMarginLiquidationRequest(Builder builder) { this.entityId = builder.entityId; this.liquidationId = builder.liquidationId; } @@ -72,9 +72,9 @@ public Builder liquidationId(String liquidationId) { return this; } - public GetXmLiquidationRequest build() throws CoinbaseClientException { + public GetCrossMarginLiquidationRequest build() throws CoinbaseClientException { validate(); - return new GetXmLiquidationRequest(this); + return new GetCrossMarginLiquidationRequest(this); } private void validate() throws CoinbaseClientException { diff --git a/src/main/java/com/coinbase/prime/financing/GetXmLiquidationResponse.java b/src/main/java/com/coinbase/prime/financing/GetCrossMarginLiquidationResponse.java similarity index 91% rename from src/main/java/com/coinbase/prime/financing/GetXmLiquidationResponse.java rename to src/main/java/com/coinbase/prime/financing/GetCrossMarginLiquidationResponse.java index 6f559b48..61fc85c3 100644 --- a/src/main/java/com/coinbase/prime/financing/GetXmLiquidationResponse.java +++ b/src/main/java/com/coinbase/prime/financing/GetCrossMarginLiquidationResponse.java @@ -20,11 +20,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** Get Cross Margin Liquidation */ -public class GetXmLiquidationResponse { +public class GetCrossMarginLiquidationResponse { @JsonProperty("liquidation") private XMLiquidationDetail liquidation; - public GetXmLiquidationResponse() {} + public GetCrossMarginLiquidationResponse() {} public XMLiquidationDetail getLiquidation() { return liquidation; diff --git a/src/main/java/com/coinbase/prime/financing/ListXmLiquidationsRequest.java b/src/main/java/com/coinbase/prime/financing/ListCrossMarginLiquidationsRequest.java similarity index 91% rename from src/main/java/com/coinbase/prime/financing/ListXmLiquidationsRequest.java rename to src/main/java/com/coinbase/prime/financing/ListCrossMarginLiquidationsRequest.java index 88c83c96..d0ce790f 100644 --- a/src/main/java/com/coinbase/prime/financing/ListXmLiquidationsRequest.java +++ b/src/main/java/com/coinbase/prime/financing/ListCrossMarginLiquidationsRequest.java @@ -27,7 +27,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** List Cross Margin Liquidations */ -public class ListXmLiquidationsRequest extends PrimeListRequest { +public class ListCrossMarginLiquidationsRequest extends PrimeListRequest { /** XM customer Prime Entity ID */ @JsonProperty(required = true, value = "entity_id") @JsonIgnore @@ -42,9 +42,9 @@ public class ListXmLiquidationsRequest extends PrimeListRequest { @JsonProperty("end_time") private String endTime; - public ListXmLiquidationsRequest() {} + public ListCrossMarginLiquidationsRequest() {} - public ListXmLiquidationsRequest(Builder builder) { + public ListCrossMarginLiquidationsRequest(Builder builder) { super(builder.cursor, builder.sortDirection, builder.limit); this.entityId = builder.entityId; this.status = builder.status; @@ -126,9 +126,9 @@ public Builder pagination(Pagination pagination) { return this; } - public ListXmLiquidationsRequest build() throws CoinbaseClientException { + public ListCrossMarginLiquidationsRequest build() throws CoinbaseClientException { validate(); - return new ListXmLiquidationsRequest(this); + return new ListCrossMarginLiquidationsRequest(this); } private void validate() throws CoinbaseClientException { diff --git a/src/main/java/com/coinbase/prime/financing/ListXmLiquidationsResponse.java b/src/main/java/com/coinbase/prime/financing/ListCrossMarginLiquidationsResponse.java similarity index 93% rename from src/main/java/com/coinbase/prime/financing/ListXmLiquidationsResponse.java rename to src/main/java/com/coinbase/prime/financing/ListCrossMarginLiquidationsResponse.java index 3eb42c44..58a98007 100644 --- a/src/main/java/com/coinbase/prime/financing/ListXmLiquidationsResponse.java +++ b/src/main/java/com/coinbase/prime/financing/ListCrossMarginLiquidationsResponse.java @@ -21,14 +21,14 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** List Cross Margin Liquidations */ -public class ListXmLiquidationsResponse { +public class ListCrossMarginLiquidationsResponse { @JsonProperty("liquidations") private XMLiquidationSummary[] liquidations; @JsonProperty("pagination") private Pagination pagination; - public ListXmLiquidationsResponse() {} + public ListCrossMarginLiquidationsResponse() {} public XMLiquidationSummary[] getLiquidations() { return liquidations; diff --git a/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java b/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java index dbbdd948..9e8ff794 100644 --- a/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java +++ b/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java @@ -506,27 +506,27 @@ public void testGetConversionFeesResponseDeserialization() throws JsonProcessing } @Test - public void testGetXmLiquidationRequestOmitsEntityId() throws JsonProcessingException { - GetXmLiquidationRequest request = - new GetXmLiquidationRequest.Builder().entityId("entity-123").liquidationId("liq-1").build(); + public void testGetCrossMarginLiquidationRequestOmitsEntityId() throws JsonProcessingException { + GetCrossMarginLiquidationRequest request = + new GetCrossMarginLiquidationRequest.Builder().entityId("entity-123").liquidationId("liq-1").build(); String json = objectMapper.writeValueAsString(request); assertTrue(json.contains("\"liquidation_id\":\"liq-1\"")); assertFalse(json.contains("entity_id")); } @Test - public void testGetXmLiquidationResponseDeserialization() throws JsonProcessingException { + public void testGetCrossMarginLiquidationResponseDeserialization() throws JsonProcessingException { String json = "{\"liquidation\":{\"liquidation_id\":\"liq-1\"}}"; - GetXmLiquidationResponse response = - objectMapper.readValue(json, GetXmLiquidationResponse.class); + GetCrossMarginLiquidationResponse response = + objectMapper.readValue(json, GetCrossMarginLiquidationResponse.class); assertNotNull(response.getLiquidation()); assertEquals("liq-1", response.getLiquidation().getLiquidationId()); } @Test - public void testListXmLiquidationsRequestSerialization() throws JsonProcessingException { - ListXmLiquidationsRequest request = - new ListXmLiquidationsRequest.Builder() + public void testListCrossMarginLiquidationsRequestSerialization() throws JsonProcessingException { + ListCrossMarginLiquidationsRequest request = + new ListCrossMarginLiquidationsRequest.Builder() .entityId("entity-123") .status( com.coinbase.prime.model.enums.XMLiquidationStatus.XM_LIQUIDATION_STATUS_LIQUIDATED) @@ -537,10 +537,10 @@ public void testListXmLiquidationsRequestSerialization() throws JsonProcessingEx } @Test - public void testListXmLiquidationsResponseDeserialization() throws JsonProcessingException { + public void testListCrossMarginLiquidationsResponseDeserialization() throws JsonProcessingException { String json = "{\"liquidations\":[{\"liquidation_id\":\"liq-1\"}]}"; - ListXmLiquidationsResponse response = - objectMapper.readValue(json, ListXmLiquidationsResponse.class); + ListCrossMarginLiquidationsResponse response = + objectMapper.readValue(json, ListCrossMarginLiquidationsResponse.class); assertEquals(1, response.getLiquidations().length); assertEquals("liq-1", response.getLiquidations()[0].getLiquidationId()); } diff --git a/src/test/java/com/coinbase/prime/integration/FinancingIT.java b/src/test/java/com/coinbase/prime/integration/FinancingIT.java index ab4a9448..e3c431dd 100644 --- a/src/test/java/com/coinbase/prime/integration/FinancingIT.java +++ b/src/test/java/com/coinbase/prime/integration/FinancingIT.java @@ -363,23 +363,23 @@ public void testGetConversionFees() throws Exception { } @Test - public void testGetXmLiquidation() throws Exception { + public void testGetCrossMarginLiquidation() throws Exception { assumeTrue( entityId != null && !entityId.isEmpty(), "Skipping: COINBASE_PRIME_ENTITY_ID not set"); FinancingService service = PrimeServiceFactory.createFinancingService(client); - GetXmLiquidationResponse response = - service.getXmLiquidation(new GetXmLiquidationRequest.Builder().entityId(entityId).build()); + GetCrossMarginLiquidationResponse response = + service.getCrossMarginLiquidation(new GetCrossMarginLiquidationRequest.Builder().entityId(entityId).build()); assertNotNull(response); } @Test - public void testListXmLiquidations() throws Exception { + public void testListCrossMarginLiquidations() throws Exception { assumeTrue( entityId != null && !entityId.isEmpty(), "Skipping: COINBASE_PRIME_ENTITY_ID not set"); FinancingService service = PrimeServiceFactory.createFinancingService(client); - ListXmLiquidationsResponse response = - service.listXmLiquidations( - new ListXmLiquidationsRequest.Builder().entityId(entityId).build()); + ListCrossMarginLiquidationsResponse response = + service.listCrossMarginLiquidations( + new ListCrossMarginLiquidationsRequest.Builder().entityId(entityId).build()); assertNotNull(response); } From ef8167b90a7746c27bb276f2a95a32d8477ee07a Mon Sep 17 00:00:00 2001 From: Carl Fluke Date: Wed, 2 Sep 2026 11:56:59 -0400 Subject: [PATCH 7/7] fmt --- .../coinbase/prime/financing/FinancingService.java | 6 ++++-- .../prime/financing/FinancingServiceImpl.java | 8 ++++---- .../financing/FinancingServiceSerializationTest.java | 11 ++++++++--- .../com/coinbase/prime/integration/FinancingIT.java | 3 ++- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/coinbase/prime/financing/FinancingService.java b/src/main/java/com/coinbase/prime/financing/FinancingService.java index 13d14aea..4a3a212d 100644 --- a/src/main/java/com/coinbase/prime/financing/FinancingService.java +++ b/src/main/java/com/coinbase/prime/financing/FinancingService.java @@ -304,7 +304,8 @@ GetConversionFeesResponse getConversionFees() * @throws CoinbaseClientException if the request fails client-side validation * @throws CoinbasePrimeException if the Prime API returns an error response */ - GetCrossMarginLiquidationResponse getCrossMarginLiquidation(GetCrossMarginLiquidationRequest request) + GetCrossMarginLiquidationResponse getCrossMarginLiquidation( + GetCrossMarginLiquidationRequest request) throws CoinbaseClientException, CoinbasePrimeException; /** @@ -317,7 +318,8 @@ GetCrossMarginLiquidationResponse getCrossMarginLiquidation(GetCrossMarginLiquid * @throws CoinbaseClientException if the request fails client-side validation * @throws CoinbasePrimeException if the Prime API returns an error response */ - ListCrossMarginLiquidationsResponse listCrossMarginLiquidations(ListCrossMarginLiquidationsRequest request) + ListCrossMarginLiquidationsResponse listCrossMarginLiquidations( + ListCrossMarginLiquidationsRequest request) throws CoinbaseClientException, CoinbasePrimeException; /** diff --git a/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java b/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java index 7d72d928..cf6900b8 100644 --- a/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java +++ b/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java @@ -259,8 +259,8 @@ public GetConversionFeesResponse getConversionFees() throws CoinbasePrimeExcepti } @Override - public GetCrossMarginLiquidationResponse getCrossMarginLiquidation(GetCrossMarginLiquidationRequest request) - throws CoinbasePrimeException { + public GetCrossMarginLiquidationResponse getCrossMarginLiquidation( + GetCrossMarginLiquidationRequest request) throws CoinbasePrimeException { return this.request( HttpMethod.GET, String.format("/entities/%s/cross_margin/liquidation", request.getEntityId()), @@ -270,8 +270,8 @@ public GetCrossMarginLiquidationResponse getCrossMarginLiquidation(GetCrossMargi } @Override - public ListCrossMarginLiquidationsResponse listCrossMarginLiquidations(ListCrossMarginLiquidationsRequest request) - throws CoinbasePrimeException { + public ListCrossMarginLiquidationsResponse listCrossMarginLiquidations( + ListCrossMarginLiquidationsRequest request) throws CoinbasePrimeException { return this.request( HttpMethod.GET, String.format("/entities/%s/cross_margin/liquidations", request.getEntityId()), diff --git a/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java b/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java index 9e8ff794..db9bf1a4 100644 --- a/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java +++ b/src/test/java/com/coinbase/prime/financing/FinancingServiceSerializationTest.java @@ -508,14 +508,18 @@ public void testGetConversionFeesResponseDeserialization() throws JsonProcessing @Test public void testGetCrossMarginLiquidationRequestOmitsEntityId() throws JsonProcessingException { GetCrossMarginLiquidationRequest request = - new GetCrossMarginLiquidationRequest.Builder().entityId("entity-123").liquidationId("liq-1").build(); + new GetCrossMarginLiquidationRequest.Builder() + .entityId("entity-123") + .liquidationId("liq-1") + .build(); String json = objectMapper.writeValueAsString(request); assertTrue(json.contains("\"liquidation_id\":\"liq-1\"")); assertFalse(json.contains("entity_id")); } @Test - public void testGetCrossMarginLiquidationResponseDeserialization() throws JsonProcessingException { + public void testGetCrossMarginLiquidationResponseDeserialization() + throws JsonProcessingException { String json = "{\"liquidation\":{\"liquidation_id\":\"liq-1\"}}"; GetCrossMarginLiquidationResponse response = objectMapper.readValue(json, GetCrossMarginLiquidationResponse.class); @@ -537,7 +541,8 @@ public void testListCrossMarginLiquidationsRequestSerialization() throws JsonPro } @Test - public void testListCrossMarginLiquidationsResponseDeserialization() throws JsonProcessingException { + public void testListCrossMarginLiquidationsResponseDeserialization() + throws JsonProcessingException { String json = "{\"liquidations\":[{\"liquidation_id\":\"liq-1\"}]}"; ListCrossMarginLiquidationsResponse response = objectMapper.readValue(json, ListCrossMarginLiquidationsResponse.class); diff --git a/src/test/java/com/coinbase/prime/integration/FinancingIT.java b/src/test/java/com/coinbase/prime/integration/FinancingIT.java index e3c431dd..b997e66a 100644 --- a/src/test/java/com/coinbase/prime/integration/FinancingIT.java +++ b/src/test/java/com/coinbase/prime/integration/FinancingIT.java @@ -368,7 +368,8 @@ public void testGetCrossMarginLiquidation() throws Exception { entityId != null && !entityId.isEmpty(), "Skipping: COINBASE_PRIME_ENTITY_ID not set"); FinancingService service = PrimeServiceFactory.createFinancingService(client); GetCrossMarginLiquidationResponse response = - service.getCrossMarginLiquidation(new GetCrossMarginLiquidationRequest.Builder().entityId(entityId).build()); + service.getCrossMarginLiquidation( + new GetCrossMarginLiquidationRequest.Builder().entityId(entityId).build()); assertNotNull(response); }