curl --request POST \
--url https://api.anchorage-staging.com/v2/transactions/consolidate-stake \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"assetType": "ETH",
"idempotentId": "12838927347",
"source": {
"id": "1c920f4241b78a1d483a29f3c24b6c4c",
"type": "WALLET"
},
"sourceStakingPosition": "0xa1d1...",
"targetStakingPosition": "0x9647...",
"description": "Internal ID: #12838927347"
}
'import requests
url = "https://api.anchorage-staging.com/v2/transactions/consolidate-stake"
payload = {
"assetType": "ETH",
"idempotentId": "12838927347",
"source": {
"id": "1c920f4241b78a1d483a29f3c24b6c4c",
"type": "WALLET"
},
"sourceStakingPosition": "0xa1d1...",
"targetStakingPosition": "0x9647...",
"description": "Internal ID: #12838927347"
}
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({
assetType: 'ETH',
idempotentId: '12838927347',
source: {id: '1c920f4241b78a1d483a29f3c24b6c4c', type: 'WALLET'},
sourceStakingPosition: '0xa1d1...',
targetStakingPosition: '0x9647...',
description: 'Internal ID: #12838927347'
})
};
fetch('https://api.anchorage-staging.com/v2/transactions/consolidate-stake', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"transactionId": "8696144cca28a634c05858d00e51191408498a7808a837fc4645b4b6997dde09"
}
}{
"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'."
}Create a consolidate stake request
Permissions required: Initiate Staking and Unstaking
Consolidate a source staking position into a target staking position. Only supported for Ethereum 0x02 validators.
curl --request POST \
--url https://api.anchorage-staging.com/v2/transactions/consolidate-stake \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"assetType": "ETH",
"idempotentId": "12838927347",
"source": {
"id": "1c920f4241b78a1d483a29f3c24b6c4c",
"type": "WALLET"
},
"sourceStakingPosition": "0xa1d1...",
"targetStakingPosition": "0x9647...",
"description": "Internal ID: #12838927347"
}
'import requests
url = "https://api.anchorage-staging.com/v2/transactions/consolidate-stake"
payload = {
"assetType": "ETH",
"idempotentId": "12838927347",
"source": {
"id": "1c920f4241b78a1d483a29f3c24b6c4c",
"type": "WALLET"
},
"sourceStakingPosition": "0xa1d1...",
"targetStakingPosition": "0x9647...",
"description": "Internal ID: #12838927347"
}
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({
assetType: 'ETH',
idempotentId: '12838927347',
source: {id: '1c920f4241b78a1d483a29f3c24b6c4c', type: 'WALLET'},
sourceStakingPosition: '0xa1d1...',
targetStakingPosition: '0x9647...',
description: 'Internal ID: #12838927347'
})
};
fetch('https://api.anchorage-staging.com/v2/transactions/consolidate-stake', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"transactionId": "8696144cca28a634c05858d00e51191408498a7808a837fc4645b4b6997dde09"
}
}{
"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)
)
)
^[0-9A-Fa-f]{128,160}$Current timestamp, represented as unix epoch seconds
Body
A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.
Use /asset-types to list all of the supported asset types for your organization.
"ETH"
A client-provided unique ID for idempotent requests
128"12838927347"
An object representing a resource capable of sending funds.
Construction example:
{
"id":"1c920f4241b78a1d483a29f3c24b6c4c",
"type":"WALLET"
}
Show child attributes
Show child attributes
Source staking validator public key to consolidate
"0xa1d1..."
Target staking validator public key
"0x9647..."
An optional string providing more context to this transaction. It will be visible on the Anchorage Digital iOS app and will not be published to the blockchain.
"Internal ID: #12838927347"
Response
Successfully initiated a consolidate stake transaction
Show child attributes
Show child attributes
{
"transactionId": "8696144cca28a634c05858d00e51191408498a7808a837fc4645b4b6997dde09"
}
Was this page helpful?