Coinbase International Exchange API
cURL
curl --request POST \ --url https://api.international.coinbase.com/api/v1/portfolios/{portfolio}/loans/{asset} \ --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 }'
{ "portfolio_id": "t4umaqa-1-1", "asset_id": "14thr7fc-1-1", "delta": 10.75, "total": 100.75, "asset_uuid": "d92669ba-8a04-46d8-9b28-a2bbaeee3b9a", "portfolio_uuid": "018ab3b1-d38a-750e-8a1d-8b7815ea8bfb" }
Acquire or repay loan for a given portfolio and asset.
const positionOffsetsService = new PositionOffsetsService(client); positionOffsetsService.acquireOrRepayLoan({ portfolio: 'PORTFOLIO_ID_HERE', asset: 'ETH', action: LoanUpdateAction.ACQUIRE, amount: '1', }).then(async (response) => { console.log('Active Loan: ', response); })
ACQUIRE
REPAY
Was this page helpful?