POST
/
api
/
v1
/
portfolios
/
{portfolio}
/
auto-margin-enabled
curl --request POST \
  --url https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/auto-margin-enabled \
  --header 'CB-ACCESS-KEY: <api-key>' \
  --header 'CB-ACCESS-PASSPHRASE: <api-key>' \
  --header 'CB-ACCESS-SIGN: <api-key>' \
  --header 'CB-ACCESS-TIMESTAMP: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "enabled": true
}'
{
  "portfolio_id": "14thr7ft-1-0",
  "portfolio_uuid": "3d50e347-6a59-4965-a4cd-b25934d84126",
  "name": "Investment Account",
  "user_uuid": "f67de785-60a7-45ea-b87a-07e83eae7c12",
  "maker_fee_rate": 0.02,
  "taker_fee_rate": 0.04,
  "trading_lock": true,
  "borrow_disabled": true,
  "is_lsp": true,
  "is_default": true,
  "cross_collateral_enabled": true,
  "pre_launch_trading_enabled": true
}
PortfoliosService portfoliosService = IntxServiceFactory.createPortfoliosService(client);
EnableDisableAutoMarginRequest request = new EnableDisableAutoMarginRequest.Builder()
    .enabled(True)
    .build();
EnableDisableAutoMarginResponse response = portfoliosService.enableDisableAutoMargin(request);

For more information, please visit the INTX Java SDK.

Authorizations

CB-ACCESS-KEY
string
header
required

The Client ID that owns the API Key for the request

CB-ACCESS-PASSPHRASE
string
header
required

The pass phrase affiliated with the API Key

CB-ACCESS-SIGN
string
header
required

A HMAC SHA-256 signature using the API Key secret on the string TIMESTAMP, METHOD, REQUEST_PATH, BODY

CB-ACCESS-TIMESTAMP
string
header
required

The timestamp of when the request is being made

Path Parameters

portfolio
string
required

Identifies the portfolio by UUID (e.g., 892e8c7c-e979-4cad-b61b-55a197932cf1) or portfolio ID (e.g., 5189861793641175)

Body

application/json

Response

200
application/json

Auto margin setting updated

The response is of type object.