Create a new exposure
curl --request POST \
--url https://api.anchorage-staging.com/v2/collateral_management/exposures \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"assetTrackingConfig": {
"asset": {
"assetType": "<string>"
},
"liquidationPriority": 123,
"notes": "<string>"
},
"collateralPackageID": "<string>",
"type": "LOAN",
"clientReferenceId": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v2/collateral_management/exposures"
payload = {
"assetTrackingConfig": {
"asset": { "assetType": "<string>" },
"liquidationPriority": 123,
"notes": "<string>"
},
"collateralPackageID": "<string>",
"type": "LOAN",
"clientReferenceId": "<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({
assetTrackingConfig: {asset: {assetType: '<string>'}, liquidationPriority: 123, notes: '<string>'},
collateralPackageID: '<string>',
type: 'LOAN',
clientReferenceId: '<string>'
})
};
fetch('https://api.anchorage-staging.com/v2/collateral_management/exposures', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"exposureId": "<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'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Create a new exposure
Permissions required: Manage Collateral Exposures and Read vault activity
Creates a new exposure in the Collateral Management service.
POST
/
collateral_management
/
exposures
Create a new exposure
curl --request POST \
--url https://api.anchorage-staging.com/v2/collateral_management/exposures \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"assetTrackingConfig": {
"asset": {
"assetType": "<string>"
},
"liquidationPriority": 123,
"notes": "<string>"
},
"collateralPackageID": "<string>",
"type": "LOAN",
"clientReferenceId": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v2/collateral_management/exposures"
payload = {
"assetTrackingConfig": {
"asset": { "assetType": "<string>" },
"liquidationPriority": 123,
"notes": "<string>"
},
"collateralPackageID": "<string>",
"type": "LOAN",
"clientReferenceId": "<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({
assetTrackingConfig: {asset: {assetType: '<string>'}, liquidationPriority: 123, notes: '<string>'},
collateralPackageID: '<string>',
type: 'LOAN',
clientReferenceId: '<string>'
})
};
fetch('https://api.anchorage-staging.com/v2/collateral_management/exposures', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"exposureId": "<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'."
}{
"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)
)
)
Pattern:
^[0-9A-Fa-f]{128,160}$Body
application/json
The details for creating a new collateral exposure
The request payload for creating a new collateral exposure.
Was this page helpful?