Provision a deposit address for a wallet
curl --request POST \
--url https://api.anchorage-staging.com/v2/wallets/{walletId}/addresses \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/wallets/{walletId}/addresses"
headers = {"Api-Access-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'Api-Access-Key': '<api-key>'}};
fetch('https://api.anchorage-staging.com/v2/wallets/{walletId}/addresses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"result": "RETURNING_UNUSED_ADDRESS",
"signedAddress": {
"address": "2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw",
"addressId": "a33f83d96ca95cac000a344aa478a8b8",
"addressSignaturePayload": "7b225465787441646472657373223a22324e313941636968513161344d78515736353855464854696f554e6e4d6b6948506b77227d",
"signature": "1642000aa9cca8e8610981aefbdb204b361c9dca3fa067b88fdacfba7a0f620d721378a33f4bbadad3923e633a4d712646d1e8e314e9fcb4aa4102c0581f6503",
"certChain": "-----BEGIN CERTIFICATE-----\nMIIBkTCCATigAwIBAgIQExample...\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIBkTCCATigAwIBAgIQExample...\n-----END CERTIFICATE-----\n",
"signatureVersion": "V2",
"walletId": "a33f83d96ca95cac000a344aa478a8b8"
}
}
}{
"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": "UnprocessableEntity",
"message": "An address for this wallet is being created and is not yet available. Please try again in 5 minutes."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Provision a deposit address for a wallet
Permissions required: Create address
This endpoint allows you to request an asynchronous provision of a signed deposit address for a given wallet. For UTXO-based wallets a new address will always be provisioned upon request. For account-based wallets only one address may be provisioned per wallet and subsequent attempts will return the previously provisioned address.
Newly requested addresses may not be available for several minutes once requested.
POST
/
wallets
/
{walletId}
/
addresses
Provision a deposit address for a wallet
curl --request POST \
--url https://api.anchorage-staging.com/v2/wallets/{walletId}/addresses \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/wallets/{walletId}/addresses"
headers = {"Api-Access-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'Api-Access-Key': '<api-key>'}};
fetch('https://api.anchorage-staging.com/v2/wallets/{walletId}/addresses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"result": "RETURNING_UNUSED_ADDRESS",
"signedAddress": {
"address": "2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw",
"addressId": "a33f83d96ca95cac000a344aa478a8b8",
"addressSignaturePayload": "7b225465787441646472657373223a22324e313941636968513161344d78515736353855464854696f554e6e4d6b6948506b77227d",
"signature": "1642000aa9cca8e8610981aefbdb204b361c9dca3fa067b88fdacfba7a0f620d721378a33f4bbadad3923e633a4d712646d1e8e314e9fcb4aa4102c0581f6503",
"certChain": "-----BEGIN CERTIFICATE-----\nMIIBkTCCATigAwIBAgIQExample...\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIBkTCCATigAwIBAgIQExample...\n-----END CERTIFICATE-----\n",
"signatureVersion": "V2",
"walletId": "a33f83d96ca95cac000a344aa478a8b8"
}
}
}{
"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": "UnprocessableEntity",
"message": "An address for this wallet is being created and is not yet available. Please try again in 5 minutes."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Was this page helpful?