Skip to main content
POST
/
collateral_management
/
packages
/
{packageId}
/
collateral-decrease
Request a collateral decrease
curl --request POST \
  --url https://api.anchorage-staging.com/v2/collateral_management/packages/{packageId}/collateral-decrease \
  --header 'Api-Access-Key: <api-key>' \
  --header 'Api-Signature: <api-signature>' \
  --header 'Api-Timestamp: <api-timestamp>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "assetAmounts": [
    {
      "assetTypeID": "<string>",
      "value": "<string>"
    }
  ],
  "idempotencyKey": "<string>",
  "useGasStation": false
}
'
{
  "settlementId": "<string>"
}
Signed and idempotent. The signer injects idempotencyKey into the body. Replace PACKAGE_ID in the path before signing.

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

packageId
string
required

The unique identifier of the collateral package to request a collateral decrease on.

Body

application/json

The details for requesting a collateral decrease

The request payload for requesting a collateral decrease on a collateral package.

assetAmounts
object[]
required

Asset types and amounts to return to the pledgor. Wallet IDs are determined from the package's asset configuration.

Minimum array length: 1
idempotencyKey
string
required

Idempotency key for ensuring operation uniqueness.

Maximum string length: 128
useGasStation
boolean
default:false

Whether to use gas station for fee payment. Defaults to false.

Response

Successfully requested collateral decrease

Response from requesting a collateral decrease.

settlementId
string
required

Settlement network ID for the created two-way settlement. Used to track the settlement through its lifecycle.