Authorize a settlement
curl --request POST \
--url https://api.anchorage-staging.com/v2/atlas/settlements/{settlementId}/authorize \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"acceptorId": "<string>",
"proposerId": "<string>",
"walletAmounts": [
{
"assetType": "BTC",
"quantity": "10.45234733",
"walletId": "<string>"
}
]
}
'import requests
url = "https://api.anchorage-staging.com/v2/atlas/settlements/{settlementId}/authorize"
payload = {
"acceptorId": "<string>",
"proposerId": "<string>",
"walletAmounts": [
{
"assetType": "BTC",
"quantity": "10.45234733",
"walletId": "<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({
acceptorId: '<string>',
proposerId: '<string>',
walletAmounts: [{assetType: 'BTC', quantity: '10.45234733', walletId: '<string>'}]
})
};
fetch('https://api.anchorage-staging.com/v2/atlas/settlements/{settlementId}/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Authorize a settlement
Permissions required: Authorize Settlements
After your participant has proposed a settlement or accepted a settlement proposal, the details of the settlement must be authorized.
To authorize via API, the API key must have a special permission. Otherwise, authorization takes place in the app according to organization policy.
POST
/
atlas
/
settlements
/
{settlementId}
/
authorize
Authorize a settlement
curl --request POST \
--url https://api.anchorage-staging.com/v2/atlas/settlements/{settlementId}/authorize \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"acceptorId": "<string>",
"proposerId": "<string>",
"walletAmounts": [
{
"assetType": "BTC",
"quantity": "10.45234733",
"walletId": "<string>"
}
]
}
'import requests
url = "https://api.anchorage-staging.com/v2/atlas/settlements/{settlementId}/authorize"
payload = {
"acceptorId": "<string>",
"proposerId": "<string>",
"walletAmounts": [
{
"assetType": "BTC",
"quantity": "10.45234733",
"walletId": "<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({
acceptorId: '<string>',
proposerId: '<string>',
walletAmounts: [{assetType: 'BTC', quantity: '10.45234733', walletId: '<string>'}]
})
};
fetch('https://api.anchorage-staging.com/v2/atlas/settlements/{settlementId}/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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'."
}{
"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)
)
)
Pattern:
^[0-9A-Fa-f]{128,160}$Current timestamp, represented as unix epoch seconds
Path Parameters
ID of settlement to authorize
Minimum string length:
1Query Parameters
ID of participant authorizing the settlement
Minimum string length:
1Body
application/json
Settlement proposal
Response
Was this page helpful?