Create a Stablecoin Conversion
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.
POST
/
stablecoins
/
conversion
Create a Stablecoin Conversion
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'."
}Body
application/json
Stablecoin Conversion
Was this page helpful?