curl --request POST \
--url https://api.anchorage-staging.com/v2/stablecoins/conversion \
--header 'Api-Access-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<string>",
"destinationAssetType": "USDX",
"destinationWalletId": "<string>",
"idempotencyKey": "e763a50d-aa82-4ec7-b5a3-89ad0462d248",
"sourceAssetType": "USD",
"sourceWalletId": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v2/stablecoins/conversion"
payload = {
"amount": "<string>",
"destinationAssetType": "USDX",
"destinationWalletId": "<string>",
"idempotencyKey": "e763a50d-aa82-4ec7-b5a3-89ad0462d248",
"sourceAssetType": "USD",
"sourceWalletId": "<string>"
}
headers = {
"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-Access-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '<string>',
destinationAssetType: 'USDX',
destinationWalletId: '<string>',
idempotencyKey: 'e763a50d-aa82-4ec7-b5a3-89ad0462d248',
sourceAssetType: 'USD',
sourceWalletId: '<string>'
})
};
fetch('https://api.anchorage-staging.com/v2/stablecoins/conversion', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"authorizationOperationId": "<string>"
}{
"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 Stablecoin Conversion
Permissions required: Convert Stablecoins
Create a stablecoin conversion, either issuance or redemption. Issuance is when USD is converted to the stablecoin. Redemption is when the stablecoin asset is converted to USD.
curl --request POST \
--url https://api.anchorage-staging.com/v2/stablecoins/conversion \
--header 'Api-Access-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<string>",
"destinationAssetType": "USDX",
"destinationWalletId": "<string>",
"idempotencyKey": "e763a50d-aa82-4ec7-b5a3-89ad0462d248",
"sourceAssetType": "USD",
"sourceWalletId": "<string>"
}
'import requests
url = "https://api.anchorage-staging.com/v2/stablecoins/conversion"
payload = {
"amount": "<string>",
"destinationAssetType": "USDX",
"destinationWalletId": "<string>",
"idempotencyKey": "e763a50d-aa82-4ec7-b5a3-89ad0462d248",
"sourceAssetType": "USD",
"sourceWalletId": "<string>"
}
headers = {
"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-Access-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '<string>',
destinationAssetType: 'USDX',
destinationWalletId: '<string>',
idempotencyKey: 'e763a50d-aa82-4ec7-b5a3-89ad0462d248',
sourceAssetType: 'USD',
sourceWalletId: '<string>'
})
};
fetch('https://api.anchorage-staging.com/v2/stablecoins/conversion', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"authorizationOperationId": "<string>"
}{
"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
Body
Stablecoin Conversion
A string representing the asset used for this operation. For issuance, this value must be the stablecoin asset. For redemptions, it must be USD.
Use /asset-types to list all supported asset types for your organization.
"USDX"
Client-provided idempotency key to ensure request is processed only once
128"e763a50d-aa82-4ec7-b5a3-89ad0462d248"
A string representing the asset used for this operation. For issuance, this value must be USD. For redemptions, it must be the asset being redeemed.
Use /asset-types to list all supported asset types for your organization.
"USD"
Response
authorizationOperationId
Was this page helpful?