Skip to main content
POST
/
atlas
/
settlements
/
{settlementId}
/
accept
Accept a settlement
curl --request POST \
  --url https://api.anchorage-staging.com/v2/atlas/settlements/{settlementId}/accept \
  --header 'Api-Access-Key: <api-key>' \
  --header 'Api-Signature: <api-signature>' \
  --header 'Api-Timestamp: <api-timestamp>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "vaultId": "<string>",
  "walletAmounts": [
    {
      "assetType": "BTC",
      "quantity": "10.45234733",
      "walletId": "<string>"
    }
  ],
  "useGasStation": true
}
'
{
  "message": "Missing required field 'amount'."
}

Authorizations

Api-Access-Key
string
header
required

An API key associated with a security role

Headers

Api-Signature
string
required

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}$
Api-Timestamp
integer<int64>
required

Current timestamp, represented as unix epoch seconds

Path Parameters

settlementId
string
required

ID of settlement to authorize

Body

application/json
vaultId
string
required

ID of vault to use for the settlement

walletAmounts
object[]
required

The set of wallets to use for the requested walletAmounts. The assets must match exactly the list of assets in the proposal and the amounts must be exactly opposite the amounts in the proposal. Use positive numbers to describe assets to receive and negative to send. The sum of the amounts, by asset type, must match the negative of the sum of the amounts on the proposer's side of the settlement. The special string createWallet can be used to indicate that a new wallet should be created for this asset for this settlement.

useGasStation
boolean

Option to request to use Gas Station to cover fees for acceptor.

Response