Skip to main content
POST
/
api
/
v1
/
portfolios
/
{portfolio}
/
loans
/
{asset}
/
preview
Preview loan update
curl --request POST \
  --url https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/loans/{asset}/preview \
  --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 '{
  "action": "ACQUIRE",
  "amount": 1000
}'
{
  "initial_margin_contribution": 0.07,
  "initial_margin_delta": 0.07,
  "portfolio_initial_margin": 0.15,
  "portfolio_initial_margin_notional": 1571.5345,
  "loan_collateral_requirement": 10.01,
  "loan_collateral_requirement_delta": 10.01,
  "total_loan": 100.75,
  "loan_delta": 10.75,
  "max_available": 500.9,
  "reject_details": "<string>",
  "is_valid": true
}
  • TS/JS
const positionOffsetsService = new PositionOffsetsService(client);

positionOffsetsService.previewLoanUpdate({
    portfolio: 'PORTFOLIO_ID_HERE',
    asset: 'ETH',
    action: LoanUpdateAction.ACQUIRE,
    amount: '1',
}).then(async (response) => {
    console.log('Preview Loan: ', response);
})
For more information, please visit the INTX TS SDK.

Authorizations

CB-ACCESS-KEY
string
header
required
CB-ACCESS-PASSPHRASE
string
header
required
CB-ACCESS-SIGN
string
header
required
CB-ACCESS-TIMESTAMP
string
header
required

Path Parameters

portfolio
string
required
asset
string
required

Body

application/json
action
enum<string>
required
Available options:
ACQUIRE,
REPAY
Example:
amount
string
required
Example:

Response

initial_margin_contribution
string<string>
Example:
initial_margin_delta
string<string>
Example:
portfolio_initial_margin
string
Example:
portfolio_initial_margin_notional
string
Example:
loan_collateral_requirement
string
Example:
loan_collateral_requirement_delta
string
Example:
total_loan
string
Example:
loan_delta
string
Example:
max_available
string
Example:
reject_details
string
is_valid
boolean