Skip to main content

Get offers

GET /v1/offers

List of purchase offers from On-Ramp providers.

HTTP request

https://fiat-api.changelly.com/v1/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 On-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.

Response

Sample response

application/json
[
{
"providerCode": "moonpay",
"rate": "0.00032333333333333335",
"invertedRate": "3092.7835051546390158359",
"fee": "6.46",
"amountFrom": "150",
"amountExpectedTo": "0.0485",
"paymentMethodOffers": [
{
"amountExpectedTo": "0.0485",
"method": "card",
"methodName": "Visa / Mastercard",
"rate": "0.00032333333333333335",
"invertedRate": "3092.7835051546390158359",
"fee": "6.46"
},
{
"amountExpectedTo": "0.0484",
"method": "apple_pay",
"methodName": "Apple Pay / Google Pay",
"rate": "0.00032266666666666663",
"invertedRate": "3099.17355371900861664162",
"fee": "6.46"
}
]
},
{
"providerCode": "banxa",
"rate": "0.00032044666666666664",
"invertedRate": "3120.6441009424347781758",
"fee": "2.93",
"amountFrom": "150",
"amountExpectedTo": "0.04807",
"paymentMethodOffers": [
{
"amountExpectedTo": "0.04807",
"method": "card",
"methodName": "Visa / Mastercard",
"rate": "0.00032044666666666664",
"invertedRate": "3120.6441009424347781758",
"fee": "2.93"
},
{
"amountExpectedTo": "0.04807",
"method": "apple_pay",
"methodName": "Apple Pay / Google Pay",
"rate": "0.00032044666666666664",
"invertedRate": "3120.6441009424347781758",
"fee": "2.93"
}
]
},
{
"providerCode": "wert",
"rate": "0.00031434813333333335",
"invertedRate": "3181.18637892341001223344",
"fee": "9.39",
"amountFrom": "150",
"amountExpectedTo": "0.04715",
"paymentMethodOffers": [
{
"amountExpectedTo": "0.04715",
"method": "card",
"methodName": "Visa / Mastercard",
"rate": "0.00031434813333333335",
"invertedRate": "3181.18637892341001223344",
"fee": "9.39"
},
{
"amountExpectedTo": "0.04715",
"method": "apple_pay",
"methodName": "Apple Pay / Google Pay",
"rate": "0.00031434813333333335",
"invertedRate": "3181.18637892341001223344",
"fee": "9.39"
}
]
},
{
"providerCode": "transak",
"rate": "0.00032253533333333336",
"invertedRate": "3100.43550784100114299121",
"fee": "6.63",
"amountFrom": "150",
"amountExpectedTo": "0.04838",
"paymentMethodOffers": [
{
"amountExpectedTo": "0.04838",
"method": "apple_pay",
"methodName": "Apple Pay / Google Pay",
"rate": "0.00032253533333333336",
"invertedRate": "3100.43550784100114299121",
"fee": "6.63"
},
{
"amountExpectedTo": "0.04804",
"method": "card",
"methodName": "Visa / Mastercard",
"rate": "0.00032026186666666667",
"invertedRate": "3122.4447993392073827663",
"fee": "7.63"
}
]
}
]

Response params

NameTypeDescription
offersarray of objectsArray of offers.

offers item schema

NameTypeRequiredDescription
providerCodestringtrueThe On-Ramp provider code. Possible values.
ratestringtrueThe best rate of purchase among all payment methods. The rate includes all the fees.
invertedRatestringtrueInverted rate of purchase.
feestringtrueThe lowest value of the total fee of purchase 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 purchase.
paymentMethodOffersarray of objectstruePurchase details for each available payment type.

paymentMethodOffers item schema

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

Error schema

NameTypeRequiredDescription
providerCodestringtrueThe On-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.
invalidOfferOn-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"
}
]
}