curl --request PATCH \
--url https://api.anchorage-staging.com/v2/collateral_management/operations/{operationId} \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"notes": "<string>",
"quantity": "<string>",
"typeId": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v2/collateral_management/operations/{operationId}"
payload = {
"notes": "<string>",
"quantity": "<string>",
"typeId": "<string>"
}
headers = {
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({notes: '<string>', quantity: '<string>', typeId: '<string>'})
};
fetch('https://api.anchorage-staging.com/v2/collateral_management/operations/{operationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"action": "INITIAL_DEPOSIT",
"asset": {
"assetType": "<string>",
"type": "ANCHORAGECUSTODY"
},
"createdAt": "2019-01-02T12:34:56.000Z",
"id": "<string>",
"quantity": "<string>",
"status": "PENDING",
"type": "COLLATERAL_PACKAGE",
"typeId": "<string>",
"updatedAt": "2019-01-02T12:34:56.000Z",
"liquidationCollateralPackageId": "<string>",
"liquidationProceedAsset": {
"assetType": "<string>",
"type": "ANCHORAGECUSTODY"
},
"liquidationProceedQuantity": "<string>",
"notes": "<string>"
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Update an operation
Permissions required: Manage Collateral Packages and Read vault activity
Update an existing operation in the Collateral Management service. Only the fields provided in the request body will be updated.
curl --request PATCH \
--url https://api.anchorage-staging.com/v2/collateral_management/operations/{operationId} \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"notes": "<string>",
"quantity": "<string>",
"typeId": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v2/collateral_management/operations/{operationId}"
payload = {
"notes": "<string>",
"quantity": "<string>",
"typeId": "<string>"
}
headers = {
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({notes: '<string>', quantity: '<string>', typeId: '<string>'})
};
fetch('https://api.anchorage-staging.com/v2/collateral_management/operations/{operationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"action": "INITIAL_DEPOSIT",
"asset": {
"assetType": "<string>",
"type": "ANCHORAGECUSTODY"
},
"createdAt": "2019-01-02T12:34:56.000Z",
"id": "<string>",
"quantity": "<string>",
"status": "PENDING",
"type": "COLLATERAL_PACKAGE",
"typeId": "<string>",
"updatedAt": "2019-01-02T12:34:56.000Z",
"liquidationCollateralPackageId": "<string>",
"liquidationProceedAsset": {
"assetType": "<string>",
"type": "ANCHORAGECUSTODY"
},
"liquidationProceedQuantity": "<string>",
"notes": "<string>"
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Headers
A hex-encoded Ed25519 signature of timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body.
Construction example:
toHex(
ed25519Sign(
signing_key,
'{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
)
)
^[0-9A-Fa-f]{128,160}$Path Parameters
Body
The fields to update on the operation.
Fields for updating a Collateral Management operation. Any fields left null or omitted will not be updated.
The specific action to be performed in the operation.
Valid actions for exposures are:
INITIAL_FUNDINGPAY_DOWNPAY_UPINTEREST_PAYDOWNINTEREST_ACCRUAL
Valid actions for collateral packages are:
INITIAL_DEPOSITMARGIN_RETURN,TOP_UPCLOSE_RETURN.REHYPE_INREHYPE_OUT
INITIAL_DEPOSIT, INITIAL_FUNDING, MARGIN_RETURN, PAY_DOWN, PAY_UP, INTEREST_PAYDOWN, INTEREST_ACCRUAL, TOP_UP, CLOSE_RETURN, REHYPE_IN, REHYPE_OUT Response
The updated operation.
Contains the full, updated operation object.
The specific action to be performed in the operation.
Valid actions for exposures are:
INITIAL_FUNDINGPAY_DOWNPAY_UPINTEREST_PAYDOWNINTEREST_ACCRUALDUST
Valid actions for collateral packages are:
INITIAL_DEPOSITMARGIN_RETURNTOP_UPCLOSE_RETURN.REHYPE_INREHYPE_OUT
INITIAL_DEPOSIT, INITIAL_FUNDING, MARGIN_RETURN, PAY_DOWN, PAY_UP, INTEREST_PAYDOWN, INTEREST_ACCRUAL, TOP_UP, CLOSE_RETURN, FULL_LIQUIDATION, PARTIAL_LIQUIDATION, SWEEP, REHYPE_IN, REHYPE_OUT, GAS_FEE, DUST Was this page helpful?