Coinbase International Exchange API
cURL
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 }
Preview acquire or repay loan for a given portfolio and asset.
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); })
ACQUIRE
REPAY
Was this page helpful?