Attribute a deposit
curl --request PATCH \
--url https://api.anchorage-staging.com/v4/deposit-attributions/{depositTransactionId} \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"originatorName": "John Doe",
"originatorCountry": "US",
"sourceWalletType": "CUSTODIAL",
"notes": "US"
}
'import requests
url = "https://api.anchorage-staging.com/v4/deposit-attributions/{depositTransactionId}"
payload = {
"originatorName": "John Doe",
"originatorCountry": "US",
"sourceWalletType": "CUSTODIAL",
"notes": "US"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
originatorName: 'John Doe',
originatorCountry: 'US',
sourceWalletType: 'CUSTODIAL',
notes: 'US'
})
};
fetch('https://api.anchorage-staging.com/v4/deposit-attributions/{depositTransactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"depositTransactionId": "0e2b2f9d8d104f1e960b28567255045f",
"status": "UNDER_REVIEW"
}
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}Attribute a deposit
Permissions required: Deposit Attribution
Attribute a deposit by providing information about the originator. Only attributions in PENDING status can be attributed; on success the status moves from PENDING to UNDER_REVIEW. For attributions performed via API the attributionType will always be CLIENT_API.
PATCH
/
deposit-attributions
/
{depositTransactionId}
Attribute a deposit
curl --request PATCH \
--url https://api.anchorage-staging.com/v4/deposit-attributions/{depositTransactionId} \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"originatorName": "John Doe",
"originatorCountry": "US",
"sourceWalletType": "CUSTODIAL",
"notes": "US"
}
'import requests
url = "https://api.anchorage-staging.com/v4/deposit-attributions/{depositTransactionId}"
payload = {
"originatorName": "John Doe",
"originatorCountry": "US",
"sourceWalletType": "CUSTODIAL",
"notes": "US"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Api-Signature": "<api-signature>",
"Api-Timestamp": "<api-timestamp>",
"Api-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Api-Signature': '<api-signature>',
'Api-Timestamp': '<api-timestamp>',
'Api-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
originatorName: 'John Doe',
originatorCountry: 'US',
sourceWalletType: 'CUSTODIAL',
notes: 'US'
})
};
fetch('https://api.anchorage-staging.com/v4/deposit-attributions/{depositTransactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"depositTransactionId": "0e2b2f9d8d104f1e960b28567255045f",
"status": "UNDER_REVIEW"
}
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}Headers
Path Parameters
Body
application/json
The country code (ISO 3166-1 alpha-2) of the originator of this deposit. This field is required in order to perform an attribution.
Required string length:
2Example:
"US"
The type of wallet being used by the deposit originator:
* `CUSTODIAL` - The wallet owner does not have complete control over the wallet as they do not have the private key; a third party does. This key is needed to conduct transfers. Examples of custodial wallets include: Binance, Coinbase, Kraken, and Bitgo.
* `SELF_HOSTED` - The wallet owner has complete control over the wallet as they have the private key. Examples of self-hosted wallets include: Metamask, Trust Wallet, Ledger Nano X, Trezor One, Electrum, Exodus, and Phantom.
This field is required in order to perform an attribution.
Available options:
CUSTODIAL, SELF_HOSTED Minimum string length:
1Example:
"CUSTODIAL"
Was this page helpful?