Skip to main content

Get offers

GET /v1/sell/offers

List of selling offers from Off-Ramp providers.

HTTP request

https://fiat-api.changelly.com/v1/sell/offers

Request

Header parameters

NameTypeRequiredDescription
X-Api-KeystringtrueYour public API key.
X-Api-SignaturestringtrueThe query's serialized body signed by your private key according to the RSA-SHA256 method.

Query parameters

NameTypeRequiredDescription
providerCodestringfalseThe Off-Ramp provider code. Possible values.
externalUserIDstringfalseUser ID provided by you.
currencyFromstringtrueTicker of the pay-in currency in uppercase.
currencyTostringtrueTicker of the payout currency in uppercase.
amountFromstringtrueAmount of currency the user is going to pay.
countrystringtrueCountry ISO 3166-1 code (Alpha-2).
statestringfalseState ISO 3166-2 code. Is required if provided country is US.
ipstringfalseUser's IP address.
paymentMethodCodestringfalseThe payment method code. Possible values.

Response

Sample response

application/json
[
{
"providerCode": "moonpay",
"rate": "2729.1337",
"invertedRate": "0.0003664166398297013",
"fee": "13.14",
"amountFrom": "0.1",
"amountExpectedTo": "272.91337",
"paymentMethodOffers": [
{
"amountExpectedTo": "272.91337",
"method": "card",
"methodName": "Visa / Mastercard",
"rate": "2729.1337",
"invertedRate": "0.0003664166398297013",
"fee": "13.14"
},
{
"amountExpectedTo": "272.31337",
"method": "pix",
"methodName": "PIX",
"rate": "2723.1337",
"invertedRate": "0.0003672239816943252",
"fee": "4.99"
},
{
"amountExpectedTo": "272.31337",
"method": "yellow_card_bank_transfer",
"methodName": "Yellow Card",
"rate": "2723.1337",
"invertedRate": "0.0003672239816943252",
"fee": "4.99"
},
{
"amountExpectedTo": "272.31337",
"method": "apple_pay",
"methodName": "Apple Pay / Google Pay",
"rate": "2723.1337",
"invertedRate": "0.0003672239816943252",
"fee": "4.99"
}
]
}
]

Response params

NameTypeDescription
offersarray of objectsArray of offers.

offers item schema

NameTypeRequiredDescription
providerCodestringtrueThe Off-Ramp provider code. Possible values.
ratestringtrueThe best rate of selling among all payment methods. The rate includes all the fees.
invertedRatestringtrueInverted rate of selling.
feestringtrueThe lowest value of the total fee of selling among all payment methods.
amountFromstringtrueAmount of currency the user is going to pay.
amountExpectedTostringtrueThe largest amount of funds among all payment methods that the user is expected to get after the selling.
paymentMethodOffersarray of objectstrueSelling details for each available payment type.

paymentMethodOffers item schema

NameTypeRequiredDescription
amountExpectedTostringtrueThe amount of funds that the user is expected to get after the selling.
methodstringtrueThe payment method code. Possible values.
methodNamestringtrueThe payment method name. Possible values.
ratestringtrueCurrent rate of selling, which includes all the fees.
invertedRatestringtrueInverted rate of selling.
feestringtrueTotal fee of selling.

Error schema

NameTypeRequiredDescription
providerCodestringtrueThe Off-Ramp provider code. Possible values.
errorTypestringtrueError type.
errorMessagestringtrueError message.
errorDetailsarray of objectstrueIf the error contains no details, errorDetails equals null.

Possible error types:

TypeDescription
validationValidation error.
timeoutRequest to the provider was not completed in the allotted time.
unavailableRequest failed at the provider's end.
limitsSpecified pay-in amount is less than the minimum or more than the maximum value for the fiat currency.
countrySpecified country is not supported by the provider.
stateOffer requested for the United States, but the state parameter is not provided.
currencySpecified currency pair is not supported by the provider.
paymentMethodSpecified payment method is not supported by the provider.
invalidOfferOff-Ramp provider returned an invalid offer.

errorDetails item schema

NameTypeRequiredDescription
causestringtrueError cause. For example, it can equal min or max for the limits error type.
valuestringtrueError value. For example, it can equal the min or max supported value for the limits error type.

Error codes

CodeMessage
400BadRequest
401Unauthorized
429TooManyRequests
500InternalServerError
BadRequest
{
"errorType": "validation",
"errorMessage": "Validation error",
"errorDetails": [
{
"cause": "providerCode",
"value": "Incorrect provider code"
}
]
}