> ## 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.

# Get Exchange Cross Margin Overview

> Gets live data for Cross Margin (XM) for a specific XM customer

### Supported Products

* Exchange Cross Margin


## OpenAPI

````yaml get /v1/entities/{entity_id}/cross_margin
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: 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/entities/{entity_id}/cross_margin:
    get:
      tags:
        - Financing
      summary: Get Exchange Cross Margin Overview
      description: Gets live data for Cross Margin (XM) for a specific XM customer
      operationId: PrimeRESTAPI_GetCrossMarginOverview
      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.GetCrossMarginOverviewResponse
        '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
components:
  schemas:
    coinbase.public_rest_api.GetCrossMarginOverviewResponse:
      type: object
      properties:
        overview:
          $ref: '#/components/schemas/coinbase.public_rest_api.CrossMarginOverview'
    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.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.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.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.CrossMarginOverview:
      type: object
      properties:
        control_status:
          $ref: '#/components/schemas/coinbase.public_rest_api.XMControlStatus'
        call_status:
          $ref: '#/components/schemas/coinbase.public_rest_api.XMEntityCallStatus'
        margin_level:
          $ref: '#/components/schemas/coinbase.public_rest_api.XMMarginLevel'
        margin_summary:
          $ref: '#/components/schemas/coinbase.public_rest_api.XMSummary'
        active_margin_calls:
          type: array
          description: List of active XM margin calls
          items:
            $ref: '#/components/schemas/coinbase.public_rest_api.XMMarginCall'
        active_loans:
          type: array
          description: List of active XM loans
          items:
            $ref: '#/components/schemas/coinbase.public_rest_api.XMLoan'
        active_liquidation:
          $ref: >-
            #/components/schemas/coinbase.public_rest_api.ActiveLiquidationSummary
    coinbase.public_rest_api.BadRequestErrorCode:
      type: string
      enum:
        - VALIDATION_ERROR
        - REQUIRED_FIELD_MISSING
        - FAILED_PRECONDITION
    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.ForbiddenErrorCode:
      type: string
      enum:
        - PERMISSION_DENIED
    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.NotFoundErrorCode:
      type: string
      enum:
        - RESOURCE_NOT_FOUND
    coinbase.public_rest_api.GetCrossMarginOverviewNotFoundSubcode:
      type: string
      enum:
        - AUTH_RESOURCE_NOT_FOUND
        - ENTITY_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
    coinbase.public_rest_api.XMControlStatus:
      title: >-
        XMControlStatus is a summarization of XM customer controls for trades
        and withdrawals
      type: string
      description: >-
        - TRADES_AND_WITHDRAWALS: Allowed to trade and withdraw. See XM Margin
        Methodology for full description of when trading and withdrawals are
        enabled or disabled.
         - TRADES_ONLY: Allowed to trade but not withdraw. See XM Margin Methodology for full description of when trading and withdrawals are enabled or disabled.
         - SESSION_LOCKED: Not allowed to trade or withdraw. See XM Margin Methodology for full description of when trading and withdrawals are enabled or disabled.
      enum:
        - TRADES_AND_WITHDRAWALS
        - TRADES_ONLY
        - SESSION_LOCKED
    coinbase.public_rest_api.XMEntityCallStatus:
      type: string
      description: >-
        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.
      enum:
        - ENTITY_NO_CALL
        - ENTITY_OPEN_STANDARD_CALL
        - ENTITY_OPEN_URGENT_CALL
        - ENTITY_AGED_CALL
        - ENTITY_OPEN_DEBIT_CALL
    coinbase.public_rest_api.XMMarginLevel:
      title: >-
        XMMarginLevel is the realtime state of EQ/MR and MR-EQ monitored against
        XM thresholds as defined in the methodology
      type: string
      description: |-
        - 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.
      enum:
        - HEALTHY_THRESHOLD
        - DEFICIT_THRESHOLD
        - WARNING_THRESHOLD
        - URGENT_MARGIN_CALL_THRESHOLD
        - LIQUIDATION_THRESHOLD
    coinbase.public_rest_api.XMSummary:
      title: >-
        XMSummary is the realtime evaluated XM margin model, containing
        positions and netting info
      type: object
      properties:
        margin_requirement:
          type: string
          description: Cross Margin Margin Requirement (XMMR) notional
          example: '10362.72'
        account_equity:
          type: string
          description: Equity notional
          example: '-21542.63'
        margin_excess_shortfall:
          type: string
          description: Equity - XMMR (margin excess is > 0)
          example: '-31891.67'
        consumed_credit:
          type: string
          description: Credit consumed from Cross Margin Credit Limit (XMCL)
          example: '22906.34'
        xm_credit_limit:
          type: string
          description: >-
            XM Credit Limit (XMCL) is the maximum notional USD of total fiat and
            digital asset loans
          example: '1222322.00'
        xm_margin_limit:
          type: string
          description: XM Margin Limit (XMML) is the maximum notional USD deficit
          example: '22123.00'
        spot_equity:
          type: string
          description: Equity attributed by spot
          example: '-21505.91'
        futures_equity:
          type: string
          description: Equity attributed by futures
          example: '-36.71'
        risk_netting_info:
          $ref: '#/components/schemas/coinbase.public_rest_api.XMRiskNettingInfo'
    coinbase.public_rest_api.XMMarginCall:
      title: XMMarginCall contains details about a margin call in Cross Margin
      type: object
      properties:
        margin_call_id:
          type: string
          description: Financing margin call UUID
          example: 63a2577a-930d-413b-81e4-9e77765da8f9
        currency:
          type: string
          description: Margin call currency
          example: USD
        initial_notional_amount:
          type: string
          description: Call amount (notional) as of the margin call creation
          example: '32083.26'
        outstanding_notional_amount:
          type: string
          description: Current outstanding call amount (notional)
          example: '32083.26'
        margin_call_type:
          $ref: '#/components/schemas/coinbase.public_rest_api.XMCallType'
        margin_call_status:
          $ref: '#/components/schemas/coinbase.public_rest_api.XMCallStatus'
        called_with_margin_level:
          $ref: '#/components/schemas/coinbase.public_rest_api.XMMarginLevel'
        called_with_margin_summary:
          $ref: '#/components/schemas/coinbase.public_rest_api.XMSummary'
        due_at:
          type: string
          description: Timestamp when the margin call settlement is due
          format: date-time
        created_at:
          type: string
          description: Timestamp when the margin call was created
          format: date-time
        updated_at:
          type: string
          description: Timestamp when the margin call was last updated
          format: date-time
    coinbase.public_rest_api.XMLoan:
      title: XMLoan contains details about a Cross Margin loan
      type: object
      properties:
        loan_id:
          type: string
          description: Financing loan UUID
          example: b91a0ed6-eeec-4496-a04e-98b72b33c2b4
        loan_party:
          $ref: '#/components/schemas/coinbase.public_rest_api.XMParty'
        principal_currency:
          type: string
          description: Loan principal currency
          example: BTC
        principal_currency_market_price:
          type: string
          description: Loan principal currency market price
          example: '114531.73'
        initial_principal_amount:
          type: string
          description: Principal amount (nominal) as of loan initiation
          example: '0.2'
        outstanding_principal_amount:
          type: string
          description: Current outstanding amount (nominal)
          example: '0.2'
        created_at:
          type: string
          description: Timestamp when the loan was created / initiated
          format: date-time
        updated_at:
          type: string
          description: Timestamp when the loan was last updated
          format: date-time
    coinbase.public_rest_api.ActiveLiquidationSummary:
      title: >-
        ActiveLiquidationSummary provides a summary of the active or most recent
        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'
    coinbase.public_rest_api.XMRiskNettingInfo:
      type: object
      properties:
        dco_margin_requirement:
          type: string
          description: >-
            Derivatives Clearing Organization Margin Requirement (DMR) is the
            margin requirement for all futures positions, derived from the
            Derivatives Clearing Organization model
          example: '9243.25'
        portfolio_margin_requirement:
          type: string
          description: >-
            Portfolio Margin Requirement (PMR) is the margin requirement for all
            spot positions, derived from the XM model
          example: '9003.67'
        integrated_portfolio_margin_requirement:
          type: string
          description: >-
            Integrated Portfolio Margin Requirement (IPMR) is the margin
            requirement for all spot positions + futures positions with
            underlying assets eligible in Portfolio Margin, via the XM model
            with one-leg netting
          example: '10154.67'
        ineligible_futures_margin_requirement:
          type: string
          description: >-
            Ineligible Futures Margin Requirement (IFMR) is the margin
            requirement for IPMR-ineligible futures contracts
          example: '194.36'
        position_margin_requirement:
          type: string
          description: Position margin requirement for all spot positions
          example: '3376.45'
        portfolio_margin_addon:
          type: string
          description: Portfolio margin addon for all spot positions
          example: '5627.21'
        integrated_position_margin_requirement:
          type: string
          description: Position margin requirement for spot + futures positions
          example: '3376.45'
        integrated_portfolio_margin_addon:
          type: string
          description: Portfolio margin addon for spot + futures positions
          example: '6778.21'
        netted_futures_notional:
          type: string
          description: Post-netting USD notional for all futures positions
          example: '11510.00'
        total_gmv_basis:
          type: string
          description: >-
            Total basis gross market value of all XM-eligible positions (i.e.
            crypto underliers)
        ipm_cash_balance:
          type: string
          description: Integrated Portfolio Margin cash balance
          example: '1002.94'
        integrated_scenario_addon:
          $ref: '#/components/schemas/coinbase.public_rest_api.MarginAddOn'
        all_integrated_scenario_addons:
          type: array
          description: All integrated scenario add-ons
          items:
            $ref: '#/components/schemas/coinbase.public_rest_api.MarginAddOn'
        xm_positions:
          type: array
          description: Netted positions used in the model calculation
          items:
            $ref: '#/components/schemas/coinbase.public_rest_api.XMPosition'
    coinbase.public_rest_api.XMCallType:
      title: XMCallType is the type of margin call
      type: string
      description: |-
        - 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
      enum:
        - CALL_TYPE_STANDARD
        - CALL_TYPE_URGENT
        - CALL_TYPE_DEBIT
    coinbase.public_rest_api.XMCallStatus:
      title: XMCallStatus is the current status of the margin call
      type: string
      description: |-
        - 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
      enum:
        - CALL_STATUS_OPEN
        - CALL_STATUS_AGED
        - CALL_STATUS_SETTLED
        - CALL_STATUS_CANCELED
    coinbase.public_rest_api.XMParty:
      title: XMParty is a specific Cross Margin trading venue
      type: string
      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
      enum:
        - CBE
        - FCM
    coinbase.public_rest_api.XMLiquidationStatus:
      title: XMLiquidationStatus is the current status of an XM liquidation
      type: string
      description: >-
        - 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
      enum:
        - 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.MarginAddOn:
      type: object
      properties:
        amount:
          type: string
          description: margin add on amount
        add_on_type:
          $ref: '#/components/schemas/coinbase.public_rest_api.MarginAddOnType'
    coinbase.public_rest_api.XMPosition:
      title: XMPosition
      type: object
      properties:
        currency:
          type: string
          description: Position currency
          example: BTC
        market_price:
          type: string
          description: Current market price
          example: '114531.73'
        margin_eligible:
          type: boolean
          description: True if margin eligible, false otherwise
          example: true
        market_cap:
          type: string
          description: Total market capitalization
          example: '770000000000.00'
        adv30_days:
          type: string
          description: Average daily volume calculated over a 30-day period
          example: '1166623585.534257'
        hist5d_vol:
          type: string
          description: Historic volatility calculated over a 5-day period
          example: '0.010996074377389616'
        hist30d_vol:
          type: string
          description: Historic volatility calculated over a 30-day period
          example: '0.013617999336643158'
        hist90d_vol:
          type: string
          description: Historic volatility calculated over a 90-day period
          example: '0.015196480084775355'
        margin_requirement:
          type: string
          description: Base margin requirement for the specific asset
          example: '0.015'
        spot_balance:
          type: string
          description: XM spot balance nominal
          example: '-0.19652944'
        spot_balance_notional:
          type: string
          description: XM spot balance notional
          example: '-22508.85'
        spot_total_position_margin:
          type: string
          description: Pre-netted spot total position margin
        futures_balance:
          type: string
          description: XM futures balance nominal
          example: '-0.19652944'
        futures_balance_notional:
          type: string
          description: XM futures balance notional
          example: '-22508.85'
        futures_total_position_margin:
          type: string
          description: Pre-netted futures total position margin
        gmv_basis:
          type: string
          description: Basis GMV = |futures| + |spot| - |unnetted position|
        base_requirement:
          type: string
          description: Base margin requirement notional
        liq_shorts_add_on:
          type: string
          description: Effective liquidity add-on for the short positions
        liq_longs_add_on:
          type: string
          description: Effective liquidity add-on for the long positions
        vol_shorts_add_on:
          type: string
          description: Effective volatility add-on for the short positions
        vol_longs_add_on:
          type: string
          description: Effective volatility add-on for the long positions
        vol5days_add_on:
          type: string
          description: 5-day volatility add-on
        vol30days_add_on:
          type: string
          description: 30-day volatility add-on
        vol90days_add_on:
          type: string
          description: 90-day volatility add-on
        total_position_margin:
          type: string
          description: Total margin required
    coinbase.public_rest_api.MarginAddOnType:
      type: string
      enum:
        - SINGLE_COIN_STRESS
        - CONCENTRATION_STRESS
        - MACRO_STRESS
        - SHORT_BIASED_STRESS

````