curl --request GET \
--url 'https://api.moonpay.com/v4/swap/transaction/{transactionId}?apiKey=' \
--header 'authorization: <authorization>'{
"id": "9020fd02-42ac-497f-8b5f-41fdf4dd0b1d",
"createdAt": "2024-02-23T00:58:26.577Z",
"updatedAt": "2024-02-23T00:58:26.577Z",
"baseCurrencyAmount": "1.123",
"quoteCurrencyAmount": "0.0564",
"feeAmount": "0.0002",
"quoteCurrency": {
"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"
}
},
"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"
}
},
"customerId": "3b97352d-a9c2-4786-afe7-e7d74e0a8ad7",
"extraFeeAmount": "0.0000005",
"networkFeeAmount": "0.00039",
"status": "completed",
"depositHash": 8.377408903480862e+76,
"transactionHash": 8.377408903480862e+76,
"refundTransactionHash": 8.377408903480862e+76
}Returns a swap transaction by id. Refer to our Recipes section for more detailed examples.
curl --request GET \
--url 'https://api.moonpay.com/v4/swap/transaction/{transactionId}?apiKey=' \
--header 'authorization: <authorization>'{
"id": "9020fd02-42ac-497f-8b5f-41fdf4dd0b1d",
"createdAt": "2024-02-23T00:58:26.577Z",
"updatedAt": "2024-02-23T00:58:26.577Z",
"baseCurrencyAmount": "1.123",
"quoteCurrencyAmount": "0.0564",
"feeAmount": "0.0002",
"quoteCurrency": {
"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"
}
},
"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"
}
},
"customerId": "3b97352d-a9c2-4786-afe7-e7d74e0a8ad7",
"extraFeeAmount": "0.0000005",
"networkFeeAmount": "0.00039",
"status": "completed",
"depositHash": 8.377408903480862e+76,
"transactionHash": 8.377408903480862e+76,
"refundTransactionHash": 8.377408903480862e+76
}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]'.
A valid Swap transaction ID.
Successful response — Swap Transaction
Unique identifier for the object.
"9020fd02-42ac-497f-8b5f-41fdf4dd0b1d"
Time at which the object was created. Returned as an ISO 8601 string.
"2024-02-23T00:58:26.577Z"
Time at which the object was last updated. Returned as an ISO 8601 string.
"2024-02-23T00:58:26.577Z"
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.
"0.0564"
A positive number representing the fee for the transaction.
"0.0002"
Crypto the customer wants to get.
Show child attributes
Crypto currency the customer wants to swap.
Show child attributes
The identifier of the customer the transaction is associated with.
"3b97352d-a9c2-4786-afe7-e7d74e0a8ad7"
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"
The transaction's status.
completed, failed, waitingForDepositAddressGeneration, waitingForDeposit, executingSwap, reQuoteRequired, screeningWalletAddress, frozen "completed"
The cryptocurrency transaction identifier representing the transfer from the customer's wallet to MoonPay's wallet. Set when the deposit has been executed and received.
8.377408903480862e+76
The cryptocurrency transaction identifier representing the transfer from the MoonPay's wallet to the customer's wallet. Set when the deposit has been executed and sent.
8.377408903480862e+76
Same for transactionHash but a refund.
8.377408903480862e+76