Skip to main content
POST
/
platform
/
v1
/
quotes
/
buy
Build a buy quote
curl --request POST \
  --url https://api.moonpay.com/platform/v1/quotes/buy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source": {
    "asset": {
      "code": "USD"
    },
    "amount": "<string>"
  },
  "destination": {
    "asset": {
      "code": "<string>"
    },
    "amount": "<string>"
  },
  "wallet": {
    "address": "0x1234567890123456789012345678901234567890"
  },
  "paymentMethod": {
    "type": "apple_pay"
  }
}
'
{
  "data": {
    "source": {
      "amount": "<string>",
      "asset": {
        "code": "USD"
      }
    },
    "destination": {
      "amount": "<string>",
      "asset": {
        "code": "<string>",
        "name": "<string>",
        "precision": 123
      }
    },
    "fees": {
      "network": {
        "amount": "<string>",
        "asset": {
          "code": "USD"
        }
      },
      "moonpay": {
        "amount": "<string>",
        "asset": {
          "code": "USD"
        }
      },
      "partner": {
        "amount": "<string>",
        "asset": {
          "code": "USD"
        }
      }
    },
    "wallet": {
      "address": "0x1234567890123456789012345678901234567890"
    },
    "paymentMethod": {
      "type": "apple_pay"
    },
    "limits": {
      "daily": {
        "limit": {
          "amount": "<string>",
          "asset": {
            "code": "USD"
          }
        },
        "remaining": {
          "amount": "<string>",
          "asset": {
            "code": "USD"
          }
        }
      },
      "monthly": {
        "limit": {
          "amount": "<string>",
          "asset": {
            "code": "USD"
          }
        },
        "remaining": {
          "amount": "<string>",
          "asset": {
            "code": "USD"
          }
        }
      },
      "yearly": {
        "limit": {
          "amount": "<string>",
          "asset": {
            "code": "USD"
          }
        },
        "remaining": {
          "amount": "<string>",
          "asset": {
            "code": "USD"
          }
        }
      }
    },
    "expiresAt": "2023-11-07T05:31:56Z",
    "executable": true,
    "signature": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header using an access token.

Example: Authorization: Bearer <accessToken>

Body

application/json
source
object
required

Source asset in fiat. Amount can be set in source or destination.

Example:
{
"amount": "100.02",
"asset": { "code": "USD" }
}
destination
object
required

Destination asset in crypto. Amount can be set in destination or source.

wallet
object

Wallet address and optional tag where the crypto will be sent. Required for the quote to be executable.

Example:
{
"address": "0x1234567890123456789012345678901234567890"
}
paymentMethod
object

Payment method for the transaction. Required for the quote to be executable.

Response

The request has succeeded.

data
object
required

Quote for a fiat-to-crypto buy. Contains locked rate, fees, expiry, and signature for payment execution.