curl --request POST \
--url 'https://api.moonpay.com/v4/swap/execute_quote?apiKey=' \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"signature": "***",
"walletAddresses": {
"destinationWalletAddress": 7.55070758245981e+47,
"refundWalletAddress": 7.55070758245981e+47,
"destinationWalletAddressTag": "tag",
"refundWalletAddressTag": "tag"
},
"externalTransactionId": "6ec52bc3-236a-4570-a9e0-743e14818619"
}
'{
"baseCurrency": {
"id": "aaefa32f-161b-42c8-8115-debcbf3d6a2d",
"createdAt": "2019-05-17T18:24:45.206Z",
"updatedAt": "2019-05-17T18:24:45.206Z",
"type": "crypto",
"name": "USD Coin (ERC-20)",
"code": "usdc",
"precision": 2,
"minBuyAmount": 30,
"maxBuyAmount": 1000,
"minSellAmount": 15,
"maxSellAmount": 100000,
"addressRegex": "^(0x)[0-9A-Fa-f]{40}$",
"testnetAddressRegex": "^(0x)[0-9A-Fa-f]{40}$",
"supportsAddressTag": false,
"addressTagRegex": null,
"supportsTestMode": true,
"isSuspended": false,
"isSupportedInUs": true,
"isSellSupported": true,
"notAllowedUSStates": [
"LA",
"VI"
],
"notAllowedCountries": [
"CA"
],
"metadata": {
"contractAddress": 0,
"chainId": "1",
"networkCode": "ethereum"
}
},
"quoteCurrency": "<string>",
"baseCurrencyAmount": "1.123",
"quoteCurrencyAmount": "0.0056",
"extraFeeAmount": "0.0000005",
"networkFeeAmount": "0.00039",
"feeAmount": "0.0002",
"transactionId": "3ea41bef-cfd7-445c-91cc-853f417d4f1e",
"status": "completed"
}Executes a given swap quote. Refer to our Recipes section for more detailed examples.
curl --request POST \
--url 'https://api.moonpay.com/v4/swap/execute_quote?apiKey=' \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"signature": "***",
"walletAddresses": {
"destinationWalletAddress": 7.55070758245981e+47,
"refundWalletAddress": 7.55070758245981e+47,
"destinationWalletAddressTag": "tag",
"refundWalletAddressTag": "tag"
},
"externalTransactionId": "6ec52bc3-236a-4570-a9e0-743e14818619"
}
'{
"baseCurrency": {
"id": "aaefa32f-161b-42c8-8115-debcbf3d6a2d",
"createdAt": "2019-05-17T18:24:45.206Z",
"updatedAt": "2019-05-17T18:24:45.206Z",
"type": "crypto",
"name": "USD Coin (ERC-20)",
"code": "usdc",
"precision": 2,
"minBuyAmount": 30,
"maxBuyAmount": 1000,
"minSellAmount": 15,
"maxSellAmount": 100000,
"addressRegex": "^(0x)[0-9A-Fa-f]{40}$",
"testnetAddressRegex": "^(0x)[0-9A-Fa-f]{40}$",
"supportsAddressTag": false,
"addressTagRegex": null,
"supportsTestMode": true,
"isSuspended": false,
"isSupportedInUs": true,
"isSellSupported": true,
"notAllowedUSStates": [
"LA",
"VI"
],
"notAllowedCountries": [
"CA"
],
"metadata": {
"contractAddress": 0,
"chainId": "1",
"networkCode": "ethereum"
}
},
"quoteCurrency": "<string>",
"baseCurrencyAmount": "1.123",
"quoteCurrencyAmount": "0.0056",
"extraFeeAmount": "0.0000005",
"networkFeeAmount": "0.00039",
"feeAmount": "0.0002",
"transactionId": "3ea41bef-cfd7-445c-91cc-853f417d4f1e",
"status": "completed"
}Documentation Index
Fetch the complete documentation index at: https://dev.moonpay.com/llms.txt
Use this file to discover all available pages before exploring further.
A valid customer authentication token in the format 'Bearer [auth token]'.
Show child attributes
A valid Swap transaction ID from your backend. You can use this to associate your transaction with our transaction.
"6ec52bc3-236a-4570-a9e0-743e14818619"
Successful response — Swap Transaction
Details about the cryptocurrency the customer wants to swap.
Show child attributes
Details about the cryptocurrency the customer will receive.
A positive string number representing how much crypto the user wants to swap.
"1.123"
A positive string number representing the amount of cryptocurrency the customer will receive. Set when the swap is executed.
"0.0056"
A positive number string representing your extra fee for the transaction. It is added to baseCurrencyAmount, feeAmount and networkFeeAmount when the swap is executed.
"0.0000005"
A positive number string representing the network fee for the transaction. It is added to baseCurrencyAmount, feeAmount and extraFeeAmount when the swap is executed.
"0.00039"
A positive number representing the fee for the transaction.
"0.0002"
A valid Swap transaction ID.
"3ea41bef-cfd7-445c-91cc-853f417d4f1e"
The transaction's status. Possible values are completed, failed, waitingForDepositAddressGeneration, waitingForDeposit, executingSwap, reQuoteRequired, screeningWalletAddress, frozen.
completed, failed, waitingForDepositAddressGeneration, waitingForDeposit, executingSwap, reQuoteRequired, screeningWalletAddress, frozen "completed"