> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit Order

> Edit an open order.



## OpenAPI

````yaml put /v1/portfolios/{portfolio_id}/orders/{order_id}/edit
openapi: 3.0.1
info:
  title: REST API
  description: >-
    The Coinbase Prime REST API provides programmatic access to trading,
    custody, staking, market data, and account management functionality.
  version: '0.1'
servers:
  - url: https://api.prime.coinbase.com/
security: []
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: 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/portfolios/{portfolio_id}/orders/{order_id}/edit:
    put:
      tags:
        - Orders
      summary: Edit Order
      description: Edit an open order.
      operationId: PrimeRESTAPI_EditOrder
      parameters:
        - name: portfolio_id
          in: path
          description: The ID of the portfolio that owns the order
          required: true
          schema:
            type: string
        - name: order_id
          in: path
          description: The ID of the order being edited
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              required:
                - client_order_id
                - orig_client_order_id
              type: object
              properties:
                product_id:
                  type: string
                  description: 'Deprecated: The product ID of the order being edited'
                orig_client_order_id:
                  type: string
                  description: The client order ID of the order being edited
                client_order_id:
                  type: string
                  description: The updated version of the client order ID
                base_quantity:
                  type: string
                  description: >-
                    Order size in base asset units (either `base_quantity` or
                    `quote_value` is required)
                quote_value:
                  type: string
                  description: >-
                    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)
                limit_price:
                  type: string
                  description: >-
                    The limit price (required for TWAP, VWAP, LIMIT, and
                    STOP_LIMIT orders)
                expiry_time:
                  type: string
                  description: >-
                    The expiry time of the order in UTC (TWAP, VWAP, LIMIT, and
                    STOP_LIMIT GTD only)
                  format: date-time
                display_quote_size:
                  type: string
                  description: >-
                    The maximum order size that will show up on venue order
                    books. Specifying a value here effectively makes a LIMIT
                    order into an "iceberg" style order.
                display_base_size:
                  type: string
                  description: >-
                    The maximum order size that will show up on venue order
                    books. Specifying a value here effectively makes a LIMIT
                    order into an "iceberg" style order.
                stop_price:
                  type: string
                  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':
          description: A successful response.
          content:
            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
components:
  schemas:
    coinbase.public_rest_api.EditOrderResponse:
      type: object
      properties:
        order_id:
          type: string
          description: The ID of the order being edited
    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.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.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.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.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.BadRequestErrorCode:
      type: string
      enum:
        - VALIDATION_ERROR
        - REQUIRED_FIELD_MISSING
        - FAILED_PRECONDITION
    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.ForbiddenErrorCode:
      type: string
      enum:
        - PERMISSION_DENIED
    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.NotFoundErrorCode:
      type: string
      enum:
        - RESOURCE_NOT_FOUND
    coinbase.public_rest_api.EditOrderNotFoundSubcode:
      type: string
      enum:
        - AUTH_RESOURCE_NOT_FOUND
        - ENTITY_NOT_FOUND
        - BUYING_POWER_NOT_FOUND
    coinbase.public_rest_api.TooManyRequestsErrorCode:
      type: string
      enum:
        - RATE_LIMIT_EXCEEDED
    coinbase.public_rest_api.TooManyRequestsSubcode:
      type: string
      enum:
        - SERVER_RATE_LIMIT_EXCEEDED
    coinbase.public_rest_api.ServiceUnavailableErrorCode:
      type: string
      enum:
        - SERVICE_UNAVAILABLE
    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

````