Skip to main content
GET
/
v3
/
currencies
/
{currencyCode}
/
sell_quote
Get Sell quote
curl --request GET \
  --url 'https://api.moonpay.com/v3/currencies/{currencyCode}/sell_quote?apiKey='
import requests

url = "https://api.moonpay.com/v3/currencies/{currencyCode}/sell_quote?apiKey="

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.moonpay.com/v3/currencies/{currencyCode}/sell_quote?apiKey=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.moonpay.com/v3/currencies/{currencyCode}/sell_quote?apiKey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.moonpay.com/v3/currencies/{currencyCode}/sell_quote?apiKey="

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.moonpay.com/v3/currencies/{currencyCode}/sell_quote?apiKey=")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.moonpay.com/v3/currencies/{currencyCode}/sell_quote?apiKey=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "quoteCurrencyCode": "eur",
  "quoteCurrency": {
    "id": "6f424585-8936-4eb1-b01e-443fb306d1f5",
    "createdAt": "2019-05-17T18:24:45.206Z",
    "updatedAt": "2019-05-17T18:24:45.206Z",
    "type": "fiat",
    "name": "Pound Sterling",
    "code": "gbp",
    "precision": 2,
    "minBuyAmount": 30,
    "maxBuyAmount": 9000,
    "isSellSupported": true
  },
  "baseCurrencyCode": "btc",
  "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"
    }
  },
  "baseCurrencyAmount": 0.575,
  "quoteCurrencyAmount": 1521.11,
  "baseCurrencyPrice": 45677.965840087985,
  "feeAmount": 15.36,
  "extraFeeAmount": 0,
  "payoutMethod": "credit_debit_card",
  "signature": "really-long-string",
  "expiresIn": 1800,
  "expiresAt": "2024-02-23T00:58:26.577Z"
}
{
"message": "<string>",
"type": "<string>"
}

Authorizations

apiKey
string
query
required

Path Parameters

currencyCode
string
required

The code of the cryptocurrency from the currencies list

Query Parameters

query
object
required

Response

Successful response — Sell Quote

quoteCurrencyCode
string

Fiat currency the customer wants to get.

Example:

"eur"

quoteCurrency
object
baseCurrencyCode
string

Crypto currency the customer wants to sell.

Example:

"btc"

baseCurrency
object
baseCurrencyAmount
number

A positive number representing how much the customer wants to sell.

Example:

0.575

quoteCurrencyAmount
number

A positive number representing the amount of cryptocurrency the customer will receive.

Example:

1521.11

baseCurrencyPrice
number

The price of the crypto the customer wants to sell

Example:

45677.965840087985

feeAmount
number

A positive number representing the fee for the transaction.

Example:

15.36

extraFeeAmount
number

A positive number representing your extra fee for the transaction.

Example:

0

payoutMethod
enum<string>

The transaction's payout method. Possible values are credit_debit_card, ach_bank_transfer, paypal, sepa_bank_transfer, and gbp_bank_transfer .

Available options:
ach_bank_transfer,
credit_debit_card,
paypal,
gbp_bank_transfer,
sepa_bank_transfer
Example:

"credit_debit_card"

signature
string | null

The signature for executing the quote for fixed flow

Example:

"really-long-string"

expiresIn
number | null

The time in seconds until the quote expires.

Example:

1800

expiresAt
string | null

Time at which the quote expires. Returned as an ISO 8601 string.

Example:

"2024-02-23T00:58:26.577Z"