curl --request POST \
--url https://api.anchorage-staging.com/v2/collateral_management/operations \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": {
"assetType": "<string>"
},
"quantity": "<string>",
"typeId": "<string>",
"idempotentId": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v2/collateral_management/operations"
payload = {
"asset": { "assetType": "<string>" },
"quantity": "<string>",
"typeId": "<string>",
"idempotentId": "<string>",
"notes": "<string>"
}
headers = {
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
asset: {assetType: '<string>'},
quantity: '<string>',
typeId: '<string>',
idempotentId: '<string>',
notes: '<string>'
})
};
fetch('https://api.anchorage-staging.com/v2/collateral_management/operations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"operationId": "<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'."
}Create a new operation
Permissions required: Manage Collateral Packages and Read vault activity
Create a new operation in the Collateral Management service.
curl --request POST \
--url https://api.anchorage-staging.com/v2/collateral_management/operations \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": {
"assetType": "<string>"
},
"quantity": "<string>",
"typeId": "<string>",
"idempotentId": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v2/collateral_management/operations"
payload = {
"asset": { "assetType": "<string>" },
"quantity": "<string>",
"typeId": "<string>",
"idempotentId": "<string>",
"notes": "<string>"
}
headers = {
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
asset: {assetType: '<string>'},
quantity: '<string>',
typeId: '<string>',
idempotentId: '<string>',
notes: '<string>'
})
};
fetch('https://api.anchorage-staging.com/v2/collateral_management/operations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"operationId": "<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'."
}Authorizations
An API key associated with a security role
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}$Current timestamp, represented as unix epoch seconds
Body
Operation details
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 Asset symbol or ticker (e.g. BTC)
Show child attributes
Show child attributes
The quantity of the asset to be used in the operation, expressed as a decimal string.
The type of entity the operation is being performed on. This can be either a COLLATERAL_PACKAGE or an EXPOSURE.
COLLATERAL_PACKAGE, EXPOSURE The ID of the collateral package (packageId) or exposure (exposureId) for this operation
Idempotency single key
128Optional notes or comments related to the operation
Response
operationId
Was this page helpful?