curl --request GET \
--url 'https://api.moonpay.com/v4/swap/{PAIR}/quote?apiKey='{
"id": "9b9d4036-bb99-4cb8-a61e-87d0750722d2",
"expiresAt": "2024-02-23T00:58:26.577Z",
"extraFeeAmount": "0.0000005",
"networkFeeAmount": "0.00039",
"extraFeeAmountInUSD": "0",
"networkFeeAmountInUSD": "20.049237585",
"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": {
"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"
}
},
"pairName": "eth-btc",
"baseCurrencyAmount": "1.123",
"quoteCurrencyAmount": "0.0564",
"feeCurrency": {
"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"
}
},
"baseCurrencyPriceInUsd": "2946.441235",
"quoteCurrencyPriceInUsd": "51408.3015",
"liveMode": true,
"exchangeRate": "0.05731450269758475",
"signature": "really-long-string"
}Returns the swap quote for a specific swap pair.
curl --request GET \
--url 'https://api.moonpay.com/v4/swap/{PAIR}/quote?apiKey='{
"id": "9b9d4036-bb99-4cb8-a61e-87d0750722d2",
"expiresAt": "2024-02-23T00:58:26.577Z",
"extraFeeAmount": "0.0000005",
"networkFeeAmount": "0.00039",
"extraFeeAmountInUSD": "0",
"networkFeeAmountInUSD": "20.049237585",
"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": {
"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"
}
},
"pairName": "eth-btc",
"baseCurrencyAmount": "1.123",
"quoteCurrencyAmount": "0.0564",
"feeCurrency": {
"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"
}
},
"baseCurrencyPriceInUsd": "2946.441235",
"quoteCurrencyPriceInUsd": "51408.3015",
"liveMode": true,
"exchangeRate": "0.05731450269758475",
"signature": "really-long-string"
}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 pair pairName from the pairs list
Show child attributes
Successful response — Swap Quote
Unique identifier for the object.
"9b9d4036-bb99-4cb8-a61e-87d0750722d2"
Time at which the quote expires. Returned as an ISO 8601 string.
"2024-02-23T00:58:26.577Z"
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 string representing your extra fee for the transaction, in USD. It is added to baseCurrencyAmount, feeAmount and and networkFeeAmount when the swap is executed.
"0"
A positive number string representing the network fee for the transaction, in USD. It is added to baseCurrencyAmount, feeAmount and extraFeeAmount when the swap is executed.
"20.049237585"
Details about the cryptocurrency the customer wants to swap.
Show child attributes
Details about the cryptocurrency the customer will receive.
Show child attributes
The name of the cryptocurrency pair.
"eth-btc"
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 purchase of cryptocurrency has been executed.
"0.0564"
Fee currency for this quote
Show child attributes
The price of the crypto the customer wants to swap, in USD.
"2946.441235"
The price of the crypto the customer will receive, in USD.
"51408.3015"
Whether live mode is enabled for this quote.
true
The rate provided by the underlying exchange.
"0.05731450269758475"
The signature for executing the quote
"really-long-string"