Create a USD Withdrawal Request for a subaccount
curl --request POST \
--url https://api.anchorage-staging.com/v2/subaccounts/{subaccountId}/fiat/withdrawals \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": {
"assetType": "USD",
"amount": "10.01"
},
"customerDetails": {
"beneficiary": {
"name": "John Doe",
"accountNumber": "123",
"address": {
"address": "123 Main Street",
"city": "Windsor",
"state": "Iowa",
"zipcode": "12312"
}
},
"financialInstitution": {
"address": {
"address": "123",
"address2": "123",
"city": "123",
"zipcode": "123",
"state": "123"
},
"name": "name",
"id": "123",
"code": "ABA"
},
"memo": "12312312"
}
}
'import requests
url = "https://api.anchorage-staging.com/v2/subaccounts/{subaccountId}/fiat/withdrawals"
payload = {
"asset": {
"assetType": "USD",
"amount": "10.01"
},
"customerDetails": {
"beneficiary": {
"name": "John Doe",
"accountNumber": "123",
"address": {
"address": "123 Main Street",
"city": "Windsor",
"state": "Iowa",
"zipcode": "12312"
}
},
"financialInstitution": {
"address": {
"address": "123",
"address2": "123",
"city": "123",
"zipcode": "123",
"state": "123"
},
"name": "name",
"id": "123",
"code": "ABA"
},
"memo": "12312312"
}
}
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({
asset: {assetType: 'USD', amount: '10.01'},
customerDetails: {
beneficiary: {
name: 'John Doe',
accountNumber: '123',
address: {address: '123 Main Street', city: 'Windsor', state: 'Iowa', zipcode: '12312'}
},
financialInstitution: {
address: {address: '123', address2: '123', city: '123', zipcode: '123', state: '123'},
name: 'name',
id: '123',
code: 'ABA'
},
memo: '12312312'
}
})
};
fetch('https://api.anchorage-staging.com/v2/subaccounts/{subaccountId}/fiat/withdrawals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"transactionId": "c4c4652f-0c07-472c-a7f8-955fbe07775d"
}
}{
"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'."
}Create a USD Withdrawal Request for a subaccount
Permissions required: Subaccount
Creates a USD Withdrawal Request for an Asset within a Subaccount (FIAT only for now)
This will trigger an e-mail to be sent to the program customer to authorize the withdrawal.
POST
/
subaccounts
/
{subaccountId}
/
fiat
/
withdrawals
Create a USD Withdrawal Request for a subaccount
curl --request POST \
--url https://api.anchorage-staging.com/v2/subaccounts/{subaccountId}/fiat/withdrawals \
--header 'Api-Access-Key: <api-key>' \
--header 'Api-Signature: <api-signature>' \
--header 'Api-Timestamp: <api-timestamp>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": {
"assetType": "USD",
"amount": "10.01"
},
"customerDetails": {
"beneficiary": {
"name": "John Doe",
"accountNumber": "123",
"address": {
"address": "123 Main Street",
"city": "Windsor",
"state": "Iowa",
"zipcode": "12312"
}
},
"financialInstitution": {
"address": {
"address": "123",
"address2": "123",
"city": "123",
"zipcode": "123",
"state": "123"
},
"name": "name",
"id": "123",
"code": "ABA"
},
"memo": "12312312"
}
}
'import requests
url = "https://api.anchorage-staging.com/v2/subaccounts/{subaccountId}/fiat/withdrawals"
payload = {
"asset": {
"assetType": "USD",
"amount": "10.01"
},
"customerDetails": {
"beneficiary": {
"name": "John Doe",
"accountNumber": "123",
"address": {
"address": "123 Main Street",
"city": "Windsor",
"state": "Iowa",
"zipcode": "12312"
}
},
"financialInstitution": {
"address": {
"address": "123",
"address2": "123",
"city": "123",
"zipcode": "123",
"state": "123"
},
"name": "name",
"id": "123",
"code": "ABA"
},
"memo": "12312312"
}
}
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({
asset: {assetType: 'USD', amount: '10.01'},
customerDetails: {
beneficiary: {
name: 'John Doe',
accountNumber: '123',
address: {address: '123 Main Street', city: 'Windsor', state: 'Iowa', zipcode: '12312'}
},
financialInstitution: {
address: {address: '123', address2: '123', city: '123', zipcode: '123', state: '123'},
name: 'name',
id: '123',
code: 'ABA'
},
memo: '12312312'
}
})
};
fetch('https://api.anchorage-staging.com/v2/subaccounts/{subaccountId}/fiat/withdrawals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"transactionId": "c4c4652f-0c07-472c-a7f8-955fbe07775d"
}
}{
"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'."
}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) ) )
Pattern:
^[0-9A-Fa-f]{128,160}$Current timestamp, represented as unix epoch seconds
Path Parameters
Unique Identifier for the subaccount
Body
application/json
Response
The ID of the created Transaction
Show child attributes
Show child attributes
Was this page helpful?
⌘I